June 2008
11 posts
3 tags
How to map a network drive
net use x: \\{server}\d$ /USER:{server}\{username} {password}
Basically says you want to map d: drive on {server} to your x: drive as the {username}, which is a login locally on {server}
4 tags
Apple & Google's open web efforts →
4 tags
How to decompile everything
Quick script to decompile all the class files.
find . -name "*.class" -not -name "*\$*" | while read class
do
dir=`dirname $class`
file=`basename $class .class`
pushd $dir >/dev/null
jad -p ${file}.class > ${file}.java
popd >/dev/null
done
1 tag
2 tags
OS X's ruby framework
I think new version of ruby is meant to be installed with the following prefix, using 1.8.7 as an example.
/System/Library/Frameworks/Ruby.framework/Versions/1.8.7/usr
That way you can just /System/Library/Frameworks/Ruby.framework/Versions/Current to the version you want.
2 tags
How to revert back to os x ruby framework
As I mentioned before, I upgraded to ruby 1.8.7 and decided to use —prefix=/usr, i.e. overwriting existing ruby 1.8.6. Big mistake. After some issues I decided to roll back completely.
This is what I did (luckily I can copy the required files from my wife’s Macbook).
OS X ruby framework overview
The framework is /System/Library/Frameworks/Ruby.framework
/usr/lib/ruby is a...
1 tag
I give this 2 thumbs up :p →
1 tag
Very interesting read about scentists →
F*%#$in hell →
That’s one expensive apartment!!
1 tag
Git shirt →
Oh Oh I want one!!
May 2008
13 posts
6 tags
Ruby 1.8.7
I was in a update mood so I updated my system to use GWT 1.5.0 and ruby 1.8.7.
After updated ruby I tried to figure out how to keep the old gems. My solution was to set the following env variables (similar result could be achieved with .gemrc).
export GEM_HOME=/Library/Ruby/Gems/1.8
export GEM_PATH=/usr/lib/ruby/gems/1.8
But in the end I decided to revert back to ruby 1.8.6…....
2 tags
How to batch delete photos from iPhoto library
I use iPhoto Library Manager to manage the size of my iPhoto libraries.
When I need to split libraries there isn’t a easy way to delete photos that match your criteria (I use date) from the library.
If there are less than 50% of the photos that I want to keep in a library then I can just create a smart album that contain those photos and simply drag and drop the album to a new library....