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"
@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