teamon

  • Archive
  • RSS
  • Ask me anything

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.

    • #scala
    • #sbt
    • #akka
  • 3 months ago
  • Comments
  • Permalink
  • Share
    Tweet

Performance comparision of NeoDatis and PostgreSQL

Neodatis_vs_PostgreSQL.pdf

  • 4 months ago
  • Comments
  • Permalink
  • Share
    Tweet

Hash extension - no more hash.try(:[], key)

    • #ruby
  • 6 months ago
  • Comments
  • Permalink
  • Share
    Tweet

pow + nginx configuration

  • 9 months ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

Total git cleanup

  • 9 months ago
  • Comments
  • Permalink
  • Share
    Tweet

coffee-script compiler plugin for sbt (works with liftweb)

    • #scala
    • #liftweb
    • #cofee script
  • 11 months ago
  • 4
  • Comments
  • Permalink
  • Share
    Tweet

Neodatis OdbConfiguration printout

In case I might need this again…

Source: gist.github.com

    • #scala
    • #neodatis
  • 1 year ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

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…

    • #intel
    • #c++
    • #xcode
    • #mac
  • 1 year ago
  • 6
  • Comments
  • Permalink
  • Share
    Tweet

Rails: timeline_fu and workflow integration

Quick tip on how to integrate timeline_fu and workflow callbacks.

    • #ruby
    • #rails
  • 1 year ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

Simple scala benchmark utility

Very, very simple. Strongly influenced by Ruby’s Benchmark

Usage …

.. and the result

    • #Scala
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Scala specs cheatsheet

Based on MatchersGuide

    • #scala
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

rawler: Crawl your website and find broken links with Ruby

thechangelog:

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 rawler

For 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 message

Point 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 on GitHub]

Source: thechangelog

  • 1 year ago > thechangelog
  • 26
  • Comments
  • Permalink
  • Share
    Tweet

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.

    • #scala
    • #akka
  • 1 year ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

akka actors cheatsheet

Small cheatsheet for great akka library

    • #scala
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Scala: Combine several Partial Functions into one

    • #scala
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 4

About

Ruby, Scala and others.

Pages

  • About
  • Projects
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr