#ActiveRecord cheat sheet / EXAMPLES
$ gem install activerecordin GEMFILE: gem ‘activerecord’
REQUIRE
| Good afternoon fellow space travelers, thanks for coming along on this mission. We still have about a week | |
| before we arrive at New Zlorpia, so please return your stasis tubes to their original upright position and | |
| prepare for your mission briefing. | |
| We are going to be negotiating a trade agreement with the Zlorpians for their supply of Farkle seeds. They | |
| have a much different way of counting than we do, and I'm concerned that if we don't have a good way to | |
| work with their number system, we'll be at a disadvantage in negotiations. Let me explain: | |
| The zlorpians have a single arm that comes out of their forehead, with a hand that has 3 fingers. As a | |
| result, our base-10 way of counting (based on our ten fingers) is as alien to them as their way is to us. |
| This diff is a modified version of a diff written by Arnis Lapsa. | |
| [ The original can be found here: https://gist.github.com/ArnisL/6156593 ] | |
| This diff adds support to tmux for 24-bit color CSI SRG sequences. This | |
| allows terminal based programs that take advantage of it (e.g., vim or | |
| emacs with https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch) | |
| to display 16 million colors while running in tmux. | |
| The primary change I made was to support ":" as a delimeter as well |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| count := 0 |
It's a common confusion about terminal colors... Actually we have this:
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
| #!/bin/bash | |
| # CentOS rbenv system wide installation script | |
| # Forked from https://gist.github.com/1237417 | |
| # Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
| # Install pre-requirements | |
| yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ | |
| make bzip2 autoconf automake libtool bison iconv-devel git-core |
| # install build dependencies | |
| sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel | |
| # clone and install rbenv environment | |
| cd ~ | |
| git clone git://github.com/sstephenson/rbenv.git .rbenv | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |