{ Josh Rendek }

<3 Go & Kubernetes

After getting my new mac book pro I had an extra laptop sitting around… so why not turn it into a little low power development box My goal is to get LigHTTPD, Ruby on Rails, PHP, MySQL, and Python to work together with lighty.

Step 1: Install Lighty

gunzip lighttpd-1.4.20.tar.gz

tar -xvf lighttpd-1.4.20.tar

cd lighttpd-1.4.20

./configure Here is a list of errors / fixes encountered while doing this from a bare-bones net install. Run ./configure after each one to see what else is broken / needs to be installed.

Install MySQL:

Everything went okay so now onto Ruby

First lets get PHP working with Lighty.

First:

Second:

Lets change the document root to be /home/dev/

Lets also make sure we change the user of Lighty:

change uid to (default: don’t care)

server.groupname = “dev” Now scroll down and add this to the bottom:

Lets try starting Lighty:

Now lets see if PHP worked…. browse to your dev server’s ip and you should see the php info page, and all is well.

Now lets get Ruby working Now lets get Ruby-FCGI

“gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux -I/root/tmp/ruby-fcgi-0.8.6/ext/fcgi -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -fPIC conftest.c -o conftest.i” conftest.c:1:21: error: fcgiapp.h: No such file or directory checked program was: /* begin / 1: #include / end */


have_header: checking for fastcgi/fcgiapp.h… ——————– no

“gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux -I/root/tmp/ruby-fcgi-0.8.6/ext/fcgi -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -fPIC conftest.c -o conftest.i” conftest.c:1:29: error: fastcgi/fcgiapp.h: No such file or directory checked program was: /* begin / 1: #include / end */

——————– Fix:

Now install gem: wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz

Gunzip, tar -xvf it and then compile it:

run ruby setup.rb

That should install Gem for you.

Next you need to install Rails, which can be done very easily now

When initially doing this I ran into an issue of Rails complaining (specifically when running the ruby script/server command) about not being able to find the specific database information.

First: start a project

That creates your first demo project.

Now lets make a controller:

Start the development server:

Browse to http://yourserverip:3000/hello Error: MissingSourceFile in HelloController#index

no such file to load – sqlite3

RAILS_ROOT: /home/ruby/demo

To fix:

Hit Ctrl+C to stop the web daemon, then:

Change it to read something like:

Now to install Ruby MySQL:

Now try running the server again

and browse to http://yourserverip:3000/hello and you should get another error: Unknown action

No action responded to index. Actions:

To fix, first exit the web server (Ctrl+C), then:

Save and exit, and then:

Browse to http://yourserverip:3000/hello

And voila, Rails! You should see: “Hello World!”

I did however find a simpler way to run this using Mongrel:

Now to setup a Python (via Django)

cd /home/ mkdir python cd python django-admin.py startproject demo cd demo python manage.py runserver 0.0.0.0:8000

Browsing to http://yourserverip:8000/ you should see:

It worked! Congratulations on your first Django-powered page.

You’re now all set up with one server that can serve PHP, Python, and Ruby pages.

This is by no means a programming tutorial, I was simply showing how to get the basics set up for people to start quickly learning PHP, Python (web programming), and Ruby on Rails.

Please leave a comment if you spot a bug / error somewhere!

BlueBug Features - Integration

Jan 29, 2009 - 1 minutes

I’m working on some new features for BlueBug and one of them is a bit of integration, for instance to link to a ClientExec support ticket you just do [ce]1234[/ce] where 1234 is the ticket ID. Each project can have it’s own CE URL. I’ve also done the same with GitHub so [git]commitID[/git] will open up the page for the commit.

Would anyone like to see more If so what program (if its commercial please give me an example URL).

BlueSocket Wifi Auto Login

Jan 28, 2009 - 1 minutes

On campus they use BlueSocket as a WIFI manager…. I got tired of waiting for the browser to load their nasty redirect page to login so I wrote a simple python script to automatically log me in, just execute and your good! (only tested on MAC)

TinyMCE and Flash

Jan 23, 2009 - 1 minutes

Kept trying to enable flash in a TinyMCE editor I was using and finally the following worked for extended_valid_elements:

I also added flash and media to my plugins init as well.

Hope this helps someone else with that annoying tag stripping issue!

About 2 years I was on Roadrunner. I loved it; so much so that I always reccomended it to friends and family. Download speeds were blazing fast 10+mbps, sometimes even 15mbps. I moved away to Comcast and feared for the worst (after hearing a lot of bad reviews from them).

Boy have times changed. I’m back home visiting for the holidays and Roadrunner is absolute crap. What was once 10mbps is now a mere 1-4mbps, 4 if I’m LUCKY.

Pinging google:

round-trip min/avg/max/stddev = 56.777/171.755/1155.530/229.523 ms

1k 8% packet loss To google.

Honestly I can’t believe how far down hill their service has gone. The cable TV is skippy but the internet is just downright SLOW.

Comcast, on the other hand, usually gives me between 8 and 20mbps consistently with an average upload of 1mbps - compared to Roadrunner’s 400kbps.

While some people have Comcast horror stories, at the moment Comcast is better than RR by far to me. Things like streaming videos (watching SouthPark on Comedy Central’s SP Studios website) or watching Hitchiker’s Guide to the Galaxy on Netflix (fallen in love with that BBC series) is painful at best. Low quality from Netflix’s streaming (understandable since the connection is slow), and skipping on streaming videos.

Never thought I’d say Comcast was better than Road Runner / TimeWarner, but they are - at least for me.

As a side note: typed this from my shiney new Macbook Pro which I’m in love with. Everything’s nice and snappy.

Buying a Macbook Pro

Dec 19, 2008 - 1 minutes

So I’m planning on purchasing a shiny new Macbook Pro 2.4 ghz 2GB ram 15" screen and the 250GB 7200 RPM HDD. I was going to pick it up in store, so I first called one location. After being put on hold about 5 times while she figured out what “250GB @ 7200 rpm” meant, she said they didn’t have that model in store.

So I called the second store - she informed me that they carry ZERO upgraded models in store. So if I wanted to get the base 2.4GHz macbook pro with an upgraded HDD, I couldn’t find this in the store. Ever. Or the 2.5 GHz model with a 7200 RPM HDD, order online. Basically anything but the stock model I’d have to order online.

Needless to say I’m now just ordering online instead of going to the store since they have free 2 day shipping. Can anyone else confirm this

New Script - Server Monitor

Oct 29, 2008 - 1 minutes

I’ve been writing a new program for monitoring servers ( I havn’t found one that was easy to setup and didn’t require some painful process to setup server / remote side ). It consists of the monitoring machine where all the remote servers report to. The remote servers run a simple PHP scripts every 5 minutes that reports to the monitor.

Here are a few screen shots, let me know if you’d like to see more or learn more.