Archive for December, 2010
EventMachine Asynchronous HTTP Client – Custom Headers (User-Agent)
If you have a need to set custom request headers like User-Agent or Host, here is how you do so via the EM client
http = EventMachine::HttpRequest.new(url) .get(:head => {"User-Agent" => "Custom Agent"})
iPhone 3g Jailbreak 4.2.1 SpringBoard crash and Linux mount
After updating to 4.2.1 and untethered jailbreak via redsn0w on my iPhone 3g, I had two major issues. The first issue has to do with multitasking. The springboard would crash when using the fast switching. This was fixed by changing the following lines in /System/Library/CoreServices/SpringBoard.app/N82AP.plist
<key>opengles-1</key>
to
<key>opengles-2</key>
The next problem was mounting my iPhone in Ubuntu Linux. The error message will contain something about a timeout. If this is happening you probably need to re-pair the device by doing the following via the libimobledevice utils:
idevicepair unpair idevicepair pair idevicepair validate
Apache Phusion Passenger: Apache 2 not found
This may be pretty basic, but figured it may be useful to others. According to the passenger docs, it will look for Apache in the $PATH environment variable. So to fix the Apache 2 not found error, you first need to find the install location. A very helpful command is “whereis” that comes standard on most *NIX systems. If you have whereis installed copy/paste the following into the command line
APACHE_PATH=`whereis apache | awk '{ print $2 }'`
That will set APACHE_PATH to the path returned from whereis. Before you continue, please make sure the path was set properly.
echo $APACHE_PATH
If everything looks good, update the $PATH environment variable.
export PATH=$APACHE_PATH/bin:$PATH
Then check path to ensure it was updated
echo $PATH