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:
#!/bin/env ruby | |
# lazy hack from Robert Klemme | |
module Memory | |
# sizes are guessed, I was too lazy to look | |
# them up and then they are also platform | |
# dependent | |
REF_SIZE = 4 # ? | |
OBJ_OVERHEAD = 4 # ? |
class TrieDict | |
attr_reader :dict | |
def initialize | |
@dict = {} | |
end | |
def put(str) | |
d = nil | |
str.chars.each do |c| |
require 'benchmark' | |
# | |
# Code example for my blogpost | |
# | |
# Hash lookup in Ruby, why is it so fast? | |
# | |
# | |
# Struct used to store Hash Entries |
test: | |
override: | |
- bundle exec rspec spec | |
deployment: | |
acceptance: | |
branch: master | |
commands: | |
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>: | |
timeout: 300 |
#!/usr/bin/env ruby | |
# This is a basic deploy script for Heroku apps. | |
# It provides a structure you can use to expand on | |
# and add your own prereqs and deploy tasks. | |
# | |
# It basically ensures that: | |
# 1. There are no uncommited files | |
# 2. You can ssh to github | |
# 3. You can connect to heroku |
require 'spec_helper' | |
describe 'block example' do | |
let(:thing) { FactoryGirl.create :thing } | |
context 'without versioning' do | |
before do | |
thing.update_attributes name: 'a different name' |
require 'factory_girl_rails' | |
require 'rspec' | |
require 'rspec-rails' | |
require 'rspec/mocks/standalone' # => if factories need stubs (for remote services for example) | |
include FactoryGirl::Syntax::Methods # make FG methods available at top level, so you can do `> create :user` | |
def reload_factories! | |
FactoryGirl.instance_variable_set(:@factories, nil) # => clear loaded factories/sequences | |
# FactoryGirl.instance_variable_set(:@sequences, nil) |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html