Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}| ns | |
| L1 cache reference .......................... 0.5 | |
| Branch mispredict ........................... 5 | |
| L2 cache reference .......................... 7 | |
| Mutex lock/unlock .......................... 25 | |
| Main memory reference ..................... 100 | |
| Compress 1K bytes with Zippy ............ 3,000 | |
| Send 2K bytes over 1 Gbps network ...... 20,000 | |
| Read 1 MB sequentially from memory .... 250,000 | |
| Round trip within same datacenter ..... 500,000 |
| class ActionDispatch::Routing::Mapper | |
| def draw(routes_name) | |
| instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
| end | |
| end | |
| BCX::Application.routes.draw do | |
| draw :api | |
| draw :account | |
| draw :session |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| # only bundler will be installed here | |
| export GEM_HOME=/home/nick/.gems | |
| # run this for new projects to put the gems and bins in the directory | |
| alias bundle-bootstrap="bundle install --binstubs=.bundle/bin --path=.bundle/gems" | |
| # switch to ruby 1.8 | |
| switch-ruby-1.8 () | |
| { | |
| sudo update-alternatives --set ruby /usr/bin/ruby1.8 |
| #!/usr/bin/env bash | |
| apt-get -y update | |
| apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
| cd /tmp | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
| tar -xvzf ruby-1.9.3-p125.tar.gz | |
| cd ruby-1.9.3-p125/ | |
| ./configure --prefix=/usr/local | |
| make | |
| make install |
| module SingleRecipientSmtp | |
| def self.included(clazz) | |
| clazz.class_eval do | |
| cattr_accessor :single_recipient_smtp_settings | |
| end | |
| end | |
| def perform_delivery_single_recipient_smtp(mail) | |
| mail.to = single_recipient_smtp_settings[:to] | |
| mail.cc = nil |
Installing rbx-2.0.0-dev with Ruby 1.9 support using rbenv can be a tad tricky. This is what I did to get up and running, you'll need another version of ruby already installed as well as rake.
The basic outline:
As configured in my dotfiles.
start new:
tmux
start new with session name: