$ tmux -S /tmp/pair
$ chmod 777 /tmp/pair
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default shell should be zsh | |
| set-option -g default-shell /bin/zsh | |
| set -g default-terminal "xterm" | |
| #C-b is not acceptable -- Vim uses it | |
| set-option -g prefix C-a | |
| bind-key C-a last-window | |
| # Start numbering at 1 | |
| set -g base-index 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'selenium-webdriver' | |
| project = "Some Project" | |
| browsers = { | |
| "Firefox 18 (Windows)" => {:browser => Selenium::WebDriver::Remote::Capabilities.firefox, :platform => 'Windows 2008', :version => '18'}, | |
| "Firefox 6 (Windows)" => {:browser => Selenium::WebDriver::Remote::Capabilities.firefox, :platform => 'Windows 2003', :version => '6'}, | |
| "Safari 6 (OS X)" => {:browser => Selenium::WebDriver::Remote::Capabilities.safari, :platform => 'Mac 10.8', :version => '6'}, | |
| "Safari 5 (OS X)" => {:browser => Selenium::WebDriver::Remote::Capabilities.safari, :platform => 'Mac 10.6', :version => '5'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| if(window.innerWidth!= undefined){ | |
| return [window.innerWidth, window.innerHeight]; | |
| } | |
| else{ | |
| var B= document.body, | |
| D= document.documentElement; | |
| return [Math.max(D.clientWidth, B.clientWidth), | |
| Math.max(D.clientHeight, B.clientHeight)]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (auto_scroll = (start, height) -> | |
| setTimeout (-> | |
| increment = height / 4 | |
| next_increment = start + increment | |
| window.scrollTo start, next_increment | |
| if next_increment < height auto_scroll(next_increment, height) else return true | |
| ), 8000 | |
| )(0, document.body.scrollHeight) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ls -l | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) *2^(8-i));if(k)printf("%0o ",k);print}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| value.strip().match(/<(.*?)>/)[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "http://rubygems.org" | |
| gem 'uea-stemmer' | |
| gem 'stopwords' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var address, sitemap, system; | |
| sitemap = require('webpage').create(); | |
| system = require('system'); | |
| if (system.args.length === 1) { | |
| console.log('Usage: pagespeed.js <some DOMAIN>'); | |
| phantom.exit(1); | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you are using a gem like paper_trail that records | |
| # user edit history, you should "login" first. | |
| # See this gist for more details if you are | |
| # using Devise: | |
| # https://gist.github.com/2855072 | |
| require 'csv' | |
| csv_text = File.read('my_csv_file_to_import.csv') |