As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/usr/bin/ruby | |
| if ARGV.size.zero? | |
| puts %Q[ | |
| Usage: | |
| ./to_csv.rb file.yml > out.csv | |
| ] | |
| exit | |
| end |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| $ git remote prune origin && git branch -r --merged | | |
| grep origin | | |
| grep -v '>' | | |
| grep -v 'master' | | |
| grep -v 'release' | | |
| grep -v 'develop' | | |
| xargs -L1 | | |
| cut -d"/" -f 2 | | |
| xargs git push origin --delete |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
| <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script> | |
| <script type="text/javascript" src="jquery.tipsy.js"></script> | |
| <link href="tipsy.css" rel="stylesheet" type="text/css" /> | |
| </head> | |
| <body> | |
| <div id="chart"></div> |
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 |
| # call this to get the memory size of the process before and after a treatment | |
| def memstats | |
| size = `ps -o size= #{$$}`.strip.to_i | |
| end |
| test: | |
| override: | |
| - bundle exec rspec spec | |
| deployment: | |
| acceptance: | |
| branch: master | |
| commands: | |
| - ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>: | |
| timeout: 300 |