Kill sbt forked jvm
Recently I’ve been playing with akka under sbt. I often run sbt console and then use run command to execute my app. It works great for single threaded applications that exits by itself. When using akka, there are couple of threads that do not quit. Hitting ctrl+c quits running application AND unfortunately also sbt. I figured out, that it can be fixed with a little bit of hacking.
First, set fork in run := true is build.sbt. Then you can stop forked jam with the following shell line:
I’d suggest making it an alias or even better save as Shell Extension available via hotkey using awesome alfred app.
Performance comparision of NeoDatis and PostgreSQL
Hash extension - no more hash.try(:[], key)
pow + nginx configuration
Total git cleanup
Neodatis OdbConfiguration printout
In case I might need this again…
Source: gist.github.com
Setting up Intel Cluster Compiler with XCode 4
I just spent an hour fighting with dump Intel license server (for trial version). I’m to angry to write, so here is the solution.
The easy part
Download Composer XE for Mac from Intel website, run .dmg, click .pkg, click, click, blah, select XCode integration, click, done.
It will install everything under /opt/intel and … under /Developer/ (no, symlinks, separate install - well, wtf?)
To use icc from command line it is required to run
first.
If you use zsh, then you’ll have to modify /opt/intel/bin/iccvars.sh file and change all “==” to “=” .
Now icc should work from command line. Btw, better add this “source …” line to you .bashrc/.zshrc or you’ll end up typing that command on every new shell.
The “how to make people frustrated” part
Run XCode, choose new c++ project. In project setting select correct compiler:

You can try to hit cmd+b and pray it will work. I’m not that lucky.
It doesn’t work without executing this dump “source” line. I tried to setup build phases, pre-actions and… nothing worked. So, here is the hacky way to make it work.
then open new icc file in editor and put there:Do the same with icpc.
Now license server shit will be loaded when xcode executes /Developer/usr/bin/icc
But, that’s not everything yet. /Developer/usr/lib is missing some libraries. Just copy what needed from /opt/intel/lib (I needed libimf.a, but it may vary).
After all that hacks it *should* work…
Rails: timeline_fu and workflow integration
Quick tip on how to integrate timeline_fu and workflow callbacks.
Simple scala benchmark utility
Very, very simple. Strongly influenced by Ruby’s Benchmark
Usage …
.. and the result
Scala specs cheatsheet
Based on MatchersGuide
rawler: Crawl your website and find broken links with Ruby
Need a quick-and-dirty way to find broken links on your web site? Rawler from Oscar Del Ben is a Ruby gem that gives you a command line tool to crawl your site, looking for errors.
Install via Rubygems:
gem install rawlerFor usage, just execute the command
rawler --help:~ » rawler --help ~ 255 ↵ Rawler is a command line utility for parsing links on a website Usage: rawler http://example.com [options] where [options] are: --username, -u <s>: HTT Basic Username --password, -p <s>: HTT Basic Password --version, -v: Print version and exit --help, -h: Show this messagePoint Rawler to your URL and you’ll get a list of followed links and their HTTP status codes:
~ » rawler http://thechangelog.com ~ 130 ↵ 301 - http://thechangelog.com/episodes 200 - http://thechangelog.com/archive 200 - http://thechangelog.com/ 200 - https://chrome.google.com/extensions/detail/oiaejidbmkiecgbjeifoejpgmdaleoha 301 - http://github.com 200 - http://stylebot.me 200 - http://twitter.com/stylebot 200 - http://thechangelog.com/tagged/css 200 - https://github.com/handlino/CompassApp ...The roadmap includes:
- Follow redirects, but still inform about them
- Respect robots.txt
- Export to html
If you want to help out, fork the project and contribute.
Source: thechangelog
akka singleton actor
If you ever want to do something like this:
DON’T! NEVER. Even in tests or something, doesn’t matter, never!
Using singleton actor object + scala-specs = silen fail with message “null” and one big WTF.
akka actors cheatsheet
Small cheatsheet for great akka library