RSS  |  Archive    


Using the implementation from @peepcode’s blog on shell method missing as a base.

I’ve added another action (code snippet below) to open a gem library in TextMate by typing in the name of the gem followed by “.mate”.
when /^[A-Za-z0-9_-\/]+.mate$/
  # Open the gem in textmate
  # @example
  #   haml.mate
  gem_to_open = command.first.gsub(/.mate$/, ”)
  run “gem which #{gem_to_open} | tail -1 | xargs dirname | sed -e’s/$/\/../’ | xargs mate”

12:42 pm, by shenie,




We use Maven, when Maven downloads dependencies it doesn’t download sources, which I rely on when learn and debug programs….
I was expecting, for what seem a simple thing to me, a flag that I can add in maven’s settings files or an option to pass to mvn command…. but I couldn’t find the solution (or anything close to it). Don’t get me wrong, there are solutions out there, but I just feel it is too much hassle for the task. So I wrote a little script that go thru my repo and downloads any jar that doesn’t have its respective sources :p

5:05 pm, by shenie,




I am not a fan of port or fink so I always install ImageMagick from source.

Recently I came across a problem where ImageMagick fails to identify JPEG’s.
The error looks something like this
identify: no decode delegate for this image format
After some digging around it appears I need to install libjpeg and reinstall ImageMagick for JPEG support.
So I downloaded jpegsrc.v7.tar.gz and just run thru the standard configure, make & make install then reinstalled ImageMagick.
After the installation you should be able to see JPEG as one of the supported format via the command ”identify -list format”.
It should contain something like this.
     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (70)

11:52 am, by shenie,




This is a reminder for myself more than anything.

To learn what you can do with an application using osascript, you can run Script Editor and click “Open the Application’s Dictionary” to see properties &/methods that are available.

2:58 pm, by shenie,




NDA dropped for released software

8:08 am, by shenie,




Wonder when is Android powered phones will come to OZ. It’d be fun to write app to run on my own phone :)

7:01 am, by shenie,




Curry is going to be a double edged sword.

tagged: ruby,
11:29 am, by shenie,




Some of the commands in the survey looks interesting, must find time to learn them.

git add -i / -p
git add -u / -A
git am
git am -i
git apply
git apply --whitespace=fix
git archive
git bisect
git bisect run 
git annotate
git gui blame
git blame
git blame -L , etc.
git bundle
git cherry
git cherry-pick
git cherry-pick -n
git citool
git clean
git add + git commit
git commit -a
git commit ...
git commit -i ...
git commit --amend
git cvsexportcommit
git cvsserver
git daemon
git daemon (pushing enabled)
git ... --dirstat
git fetch []
git filter-branch
git format-patch
git grep
git imap-send
git instaweb
git log --grep/--author/...
git log -S (pickaxe search)
git log --graph
git merge
git merge with strategy
git merge --squash
git mergetool
git pull (no remote)
git pull --rebase []
git pull 
git pull 
git push
git relink
git rebase
git rebase -i
git remote
git remote update
git request-pull
git revert
git send-email
git show-branch
git shortlog
git shortlog -s
git stash
git stash --keep-index
git submodule
git svn
git whatchanged
git gui
gitk

tagged: git,scm,
12:48 am, by shenie,




A while ago I posted some shell scripts to decompile java classes.

I decided to re-implement it in ruby so I can use it between my work (Windows) and home (OS X) machines.

This version does not require you to extract the class files first. You simply pass the jar file to the script and it’ll decompress and decompile it into a directory with the same name as the jar file without .jar.

4:11 pm, by shenie,




As requested by Josh

9:28 pm, by shenie,




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}

9:37 pm, by shenie,




3:07 pm, by shenie,




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

9:30 pm, by shenie,




WOW! scary but pretty.

WOW! scary but pretty.

 
tagged: interesting,
3:39 pm, by shenie,




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.

tagged: ruby,os x,
11:15 pm, by shenie,