start new:
tmux
start new with session name:
tmux new -s myname
| ### INSTALLATION NOTES ### | |
| # 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
| # 2. brew install zsh | |
| # 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
| # 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
| # 5. Install iTerm2 | |
| # 6. In iTerm2 preferences for your profile set: | |
| # Character Encoding: Unicode (UTF-8) | |
| # Report Terminal Type: xterm-256color | |
| # 7. Put itunesartist and itunestrack into PATH |
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
| <!DOCTYPE html> | |
| <head> | |
| <title>Stay Standalone</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <script src="stay_standalone.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <ul> | |
| <li><a href="http://google.com/">Remote Link (Google)</a></li> |
| ## This gist is intended to provide a code example for the | |
| # 'Making Signed Requests' section of the 'Authentication Overview' document. | |
| # (http://developer.netflix.com/docs/Security). | |
| # | |
| # We are going to make a catalog request. The hardest part of | |
| # it is figuring out how to generate the oauth_signature. | |
| require 'cgi' | |
| require 'base64' | |
| require 'openssl' |
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 16 workers and 1 master | |
| worker_processes (rails_env == 'production' ? 16 : 4) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times | |
| preload_app true |
| #require 'rubygems' | |
| require 'pp' | |
| #require 'ap' # Awesome Print | |
| class Object | |
| # expects [ [ symbol, *args ], ... ] | |
| def recursive_send(*args) | |
| args.inject(self) { |obj, m| obj.send(m.shift, *m) } | |
| end | |
| end |
| # mysql-style output for an array of ActiveRecord objects | |
| # | |
| # Usage: | |
| # report(records) # displays report with all fields | |
| # report(records, :field1, :field2, ...) # displays report with given fields | |
| # | |
| # Example: | |
| # >> report(records, :id, :amount, :created_at) | |
| # +------+-----------+--------------------------------+ | |
| # | id | amount | created_at | |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |