As configured in my dotfiles.
start new:
tmux
start new with session name:
gem 'devise' | |
gem 'omniauth' | |
gem 'omniauth-github' | |
gem "omniauth-twitter" | |
gem "omniauth-facebook" | |
gem "omniauth-google-oauth2" |
# Gemfile | |
gem 'redis', '~> 3.0.1' |
# -*- encoding: utf-8 -*- | |
require 'digest/md5' | |
require 'nestful' | |
class Smsbao | |
attr_accessor :login, :passwd | |
def initialize(login, passwd) | |
@login = login | |
@passwd = Digest::MD5.hexdigest(passwd) |
# Usage: | |
# rails new myapp --template=path/to/this/file.rb | |
appname = File.expand_path(Dir.new('.')).split('/').last | |
#--------------- Gem setup | |
# Note this is mostly copied from puzzlenode | |
# | |
file 'Gemfile', <<_____ | |
source 'http://rubygems.org' |
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
set -g prefix C-a | |
unbind % | |
bind | split-window -h | |
bind - split-window -v | |
bind-key k select-pane -U | |
bind-key j select-pane -D | |
bind-key h select-pane -L | |
bind-key l select-pane -R | |
# status bar |
require 'rubygems' | |
require 'chinese_pinyin' | |
name = [] | |
cp = false | |
def p(z) | |
Pinyin.t(z, '') | |
end | |
# PostgreSQL. Versions 7.4 and 8.x are supported. | |
# | |
# Install the pg driver: | |
# gem install pg | |
# On Mac OS X with macports: | |
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config | |
# On Windows: | |
# gem install pg | |
# Choose the win32 build. | |
# Install PostgreSQL and put its /bin directory on your path. |