install lift with scala 2.8, sbt & jrebel 30. Aug 2010
Here’s how to get Lift running with Scala 2.8, SBT and JRebel on Mac OS X:
1) Download and install the JRebel nightly
$ wget --referer \
http://www.zeroturnaround.com/jrebel/next-releases/ \
http://www.zeroturnaround.com/downloads/jrebel-nightly-nosetup.zip
$ sudo unzip -d /usr/share/java jrebel-nightly-nosetup.zip
$ cd /usr/share/java
$ export JREBEL=jrebel-nightly-`date "+%Y-%m-%d"`
$ sudo mv jrebel $JREBEL
$ sudo ln -s $JREBEL/jrebel.jar jrebel.jar
2) Request a JRebel Scala license and copy it to the JRebel directory
$ sudo cp javarebel.lic /usr/share/java/$JREBEL
3) Install the Simple Build Tool via MacPorts.
$ sudo port install sbt
4) Edit the SBT launcher script (at /opt/local/bin/sbt)
JREBELJAR="/usr/share/java/jrebel.jar"
JAVA_OPTS="-Xmx512M -noverify"
exec java $JAVA_OPTS -javaagent:"$JREBELJAR" \
-jar "$LAUNCHJAR" $QUOTED_ARGS
5) Clone the SBT prototype of Lift to your development directory
$ git clone http://github.com/lift/lift_21_sbt.git
6) Comment in the following line in project/build/LiftProject.scala
override def scanDirectories = Nil
7) Change to the project root directory and start SBT with automatic redeployment
$ sbt
> update
> jetty-run
> ~ prepare-webapp
8) Open http://localhost:8080/ in your favorite browser
9) Make a change to src/main/webapp/index.html and refresh your browser
10) Enjoy productivity!
search multiple domains on google 28. Aug 2010
If you want to restrict your google search to a domain you can use the site syntax:
site:blogspot.com
This is really useful and I actually use it quite often. But wouldn’t it be nice to able to restrict the search to multiple domains? No problem, just use the following syntax:
site:blogspot.com | site:wordpress.com | site:typepad.com
Alternatively you can use this syntax:
site:blogspot.com OR site:wordpress.com OR site:typepad.com
The OR must be capitalized for the query to work. Sometimes it may happen that the number of search results displayed below the search field actually decreases after you have added an additional domain. I’m not sure if this means that the actual number of search results is smaller or if it is just a statistical error.
disable smart location bar in safari 28. Aug 2010
If you’re also annoyed as hell by the new address bar autocomplete feature in Safari that searches not only URLs but also titles then rejoice because SMRT is here to save your sanity. Suddenly Safari is usable again and you can finally upgrade and take part in all the extension fun!
kill all processes by path name 27. Jul 2010
To kill all processes whose executable lies in a certain path issue the following command under Linux:
ps xawww -o pid -o cmd | \
egrep /path/to/executable | \
egrep -o ^[[:digit:]]+ | \
xargs kill
And for Mac OS X:
ps xwww -o pid -o comm | \
egrep /path/to/executable | \
egrep -o ^[[:digit:]]+ | \
xargs kill
create a hardware report on mac os x 14. Jul 2010
If you want to generate an anonymous hardware report for your Mac on Snow Leopard you can use the command line version of the System Profiler.
system_profiler -detailLevel mini -xml > hardware_report.spx
This will generate a clickable hardware report without personal information. If you open it in the System Profiler it will be displayed in your native language but the report is language independent nevertheless. If you want an english plaintext version you can just leave the xml option out.
system_profiler -detailLevel mini > hardware_report.txt