JPGCompressor for Titanium

Since Titanium is not exporting the UIImageJPEGRepresentation function present in the iPhone SDK, there finally was a reason for me to write a little Titanium Module to do that myself. It is quite easy just define the desired size and pass the picture as a TiBlob, it is compressed as close as possible to the desired size and returned. Example usage is present in the app.js used for testing in the Project.

Enjoy.

IPv6 Appengine and iPhone Simulator

Since yesterday appengine is also available via IPv6, but the iPhone Simulator does not handle IPv6 all that well. So if there is IPv6 available on the Mac running the simulator, and the app connects to appengine requests seem to fail at random right now, not returning any data. In my case I had tunnelbroker providing me with IPv6 and request from the Simulator were not getting through from time to time, so for now I decided to shut down the tunnel. Just a quick info for everybody who might face a similar, random seeming request fail.

Todo.txt in Cygwin: Remember there is a windows sort!

Setting up todo.txt in cygwin I stumbled across the script not working due to the following error:

$ todo.sh ls
Input file specified two times.

--
TODO: 0 of 66 tasks shown

After some search it came clear that the problem was that todo.sh tried to use the windows internal sort command for sorting instead of the cygwin one. This can be solved by setting TODOTXT_SORT_COMMAND in the config file to “/bin/sort” instead of just “sort”. Now everything works fine.

Get links from twitter to improve RSS Reader experience

For some time now I’m using Fever to get more out of my RSS feeds. It’s nice to have a rating on articles which are important to me. There are some high volume feeds I just don’t have the time to scan, but still if something important comes up I don’t want to miss it. This is also where a great service comes in a guy I know from College build, it’s called Chillitweets. Chillitweets scans your twitter stream to extract links and presents them to the user. Since, by definition, I follow users I’m interested in they will as well post links I’m interested in which get added via Chillitweets RSS feed to my Reader. Now they can be used to rate the feeds I’m presented with. I’ve been a user of Chillitweets since the early days and I gotta say Mario really build a great service there. And to see NodeJS in action is always nice :).

Todo.txt TextMate Bundle

tmtodotxt.png

Todo.txt is a command line todo list manager completely based around a bash script to manage a txt file which holds the todos and an Android App is available as well. Since it is just a plain text file it is really nice to work with, and it syncs very easily, even if the machine you are working with doesn’t feature a GUI.
From time to time there is the need to edit the file not via the command line but via an editor. To ease my life doing this I was looking around for some support in TextMate, and since there was none I decided to start a TextMate bundle for it. Currently there is just some syntax highlighting but I plan on adding some commands as well as soon as I figure out what might be useful in the editor. The goal is not to replace the command line after all since it works perfectly well. So for anybody interested check it out, code is available on github.

UPDATE: Started to add commands, nice to use ruby to extend my text editor.

SSH into Windows

Sometimes it’s just nice to have a secure access to the Windows box at home. In my case, if possible, I try to use SSH all the way, especially since it allows tunneling as well as file access in an easy to use fashion. So just for a quick setup I currently am using freeSSHd on Windows. To be more secure I only allow authorization via a ssh key for my own specific user. This is done by copying the “key.pub” file to “C:Program Filesfreesshd” and rename it to the user using it, in my case it’s now “phil”. Now just change the settings to only allow specific users, and the authentication to require Publickey. Now everything just works like every other SSH server, and it’s possible to use this connection for tunneling, file access and in my case to tunnel my RDP connection.

SSH connection to Windows

Walkthrough to Root the Nexus S under Android 2.3.4

This has been done under MacOSX 10.6 with the current AndroidSDK. First a little advice: Root first setup all Apps later because the data will be lost during the unlock process.

Step 0

Necessary Software:
Android SDK
Fastboot for Mac
Superuser setup
Clockwork Recovery

Step 1 – Software

With all the Software together you are half way there, just install the Android SDK (unzip) somewhere. For me it is in “/Developer/android-sdk”. And run:


$ cd /Developer/android-sdk/tools
$ ./android

And install the newest SDK stuff just to make sure everything recognizes correctly. Extract fastboot and Clockwork and keep the files at hand.

Step 2 – Bootloader unlock

Boot the Nexus S in fastboot mode by holding down “Volume Up” and “Power” to boot. Now your are able to connect via fastboot so run


$ ./fastboot devices

This should show a serial number, which confirms the phone connects correctly. Now it’s time to unlock the bootloader, which will wipe all your data.


$ ./fastboot oem unlock

Step 3 – Flash recovery

Now its time to install a custom recovery which allows for the superuser mod to install correctly.


$ ./fastboot flash recovery recovery-clockwork-3.0.0.0-crespo.img

Step 4 – Install root mod

Finally we are now able to install the Superuser mod. So reboot the phone and copy the su-2.3.6.1-ef-signed.zip to the device. Reboot again into the recovery mode, and run the recovery.
You need to mount system as well as USB storage and now its just a simple install from SD Card to get the rooting going.

Step 5 – All done

Be happy and get some root Apps such as Wireshark :)

References

theunlockr
nexusshacks

Networking with NodeJS @munichjs

Yesterday I did a quick talk about ‘Lower’ level networking applications with
nodejs at munichjs. Lower in this
case means sending binary Data via a UDP/TCP socket, handle DNS resolving and
such. Interested? Talk a look at the slides

Examples can be found on github like Nodrrr to use growl from nodejs, the DNS channel patch for node and also even though it is alpha an will be broken from time to time the RDNS resolver