Skip to content

Instantly share code, notes, and snippets.

View swistak's full-sized avatar

Marcin Raczkowski swistak

  • Poland, Kraków
View GitHub Profile
@swistak
swistak / example.less
Created April 20, 2012 21:12
How to make a semantic classes with twitter grid functionality.
// Example usage
.row {
#fixed .row()
}
.row-fluid {
#fluid .row()
}
@swistak
swistak / install_mongrel_2_debian.sh
Created October 5, 2011 16:02
Mongrel2 on debian
# Change version number when needed, but keep to 2.1. series.
wget http://download.zeromq.org/zeromq-2.1.10.tar.gz
tar -zxf zeromq-*.tar.gz
cd zeromq-*
aptitude install uuid-dev # Any other deps?
./configure
make
sudo make install
ldconfig # Somtimes needed to reload libraries, especially if You get 'libzmq.so.1: cannot open shared object file: No such file or directory'
@swistak
swistak / install_qt_rvm.sh
Created August 5, 2011 23:21 — forked from changemewtf/gist:653824
Installing Qt bindings on an rvm-controlled ruby(without sudo!)
# Ubuntu 10.04 / Debian
rm CMakeCache.txt # Cache needs to be cleaned if you tried to install QtRuby with 1.9.2
# rvm 1.0.14
sudo aptitude install libqt4-core libqt4-dev cmake automoc
# from http://rubyforge.org/projects/korundum/
wget http://rubyforge.org/frs/download.php/71843/qt4-qtruby-2.1.0.tar.gz
tar -xvzf qt4-qtruby-2.1.0.tar.gz
cd qt4-qtruby-2.1.0
# the qtruby install uses the location of your ruby binary
rvm use 1.8.7
@swistak
swistak / load_meter
Created January 10, 2011 01:42
Simple server load meter for.
ruby -e ' i=0; print " "; (1..20).each{|x| print "%3d |" % (x)}; puts; loop{ `uptime` =~ /load average: ([\d.]+)/; load = $1.to_f * 5; print("\r" + ("=" * load.ceil) + (" " * (100 - load.ceil)) + (%w{- \\ | /})[i%4]); $stdout.flush; i+=1; sleep 0.1} '
require 'mh/blank_slate'
require 'mh/message_recorder'
module QueryBuilder
OPERATOR_MAP = {
:'<' => :lt,
:'<=' => :lte,
:'>=' => :gte,
:'>' => :gt,
:'=~' => :matches,