Skip to content

Instantly share code, notes, and snippets.

View spearfisher's full-sized avatar

Denys Bereza spearfisher

  • Cherkasy, Ukraine
View GitHub Profile
require "sequel"
DB = Sequel.postgres("arel")
DB.create_table!(:movies) { primary_key :id }
class Movie < Sequel::Model
end
# Asterisk (I agree this one isn't ideal)
Movie.select{count{}.*} # SELECT count(*) FROM "movies"
#Configuration
###########################
# use 256 term for pretty colors
set -g default-terminal "screen-256color"
# increase scroll-back history
set -g history-limit 5000
# use vim key bindings
#!/bin/bash
SESSION_NAME=transparent
function has-session {
tmux has-session -t ${SESSION_NAME} 3>/dev/null
}
if has-session ; then
echo "Session already exists"
@spearfisher
spearfisher / install.md
Created October 8, 2015 06:51 — forked from galulex/install.md
Ruby On Rails Ubuntu 15.04 install

Developer libs

mysql, rmagic, curl, git, vim, sqlite, nodejs nokogiri...

sudo apt-get install libxslt1-dev libxml2-dev libmagickwand-dev imagemagick libsqlite3-dev libcurl4-openssl-dev curl git git-gui vim-gtk exuberant-ctags nodejs nodejs-legacy rar

Ruby

sudo apt-get install python-software-properties

sudo apt-add-repository ppa:brightbox/ruby-ng