Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"key": "ctrl+l", | |
"command": "workbench.action.focusFirstEditorGroup", | |
"when": "sideBarFocus" | |
}, | |
{ | |
"key": "ctrl+h", | |
"command": "workbench.action.focusActiveEditorGroup", |
#!/usr/bin/env ruby | |
require 'open3' | |
# Returns true if all files are EOF | |
# | |
def all_eof(files) | |
files.find { |f| !f.eof }.nil? | |
end |
#!/usr/bin/perl | |
# Script to (generate a script to) fix excess use of double-quotes in HAML. | |
# To use: | |
# | |
# haml-lint app/views/ > haml_errors | |
# grep "you don't need string interpolation" haml_errors | awk '{print $1}' > single_quote_me | |
# perl single_quote.pl | |
# bash fixme.sh | |
# git commit -a -m "Use single-quotes in straightforward cases" |
# | |
# fair-queue based settings for EdgeRouter Lite traffic shaping | |
# | |
# download is typically 30 and change. everything can burst to 100% | |
# of bandwidth, priority rules keep the garbage in check | |
set traffic-policy shaper download | |
set traffic-policy shaper download bandwidth 30Mbit |
require 'erb' | |
# lib/missing_spec_generator.rb | |
class MissingSpecGenerator | |
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
def spec_file spec_path, file_name, spec_template, namespace | |
spec_name = file_name.gsub('.rb', '') + '_spec.rb' | |
if File.exist?("#{spec_path}/#{spec_name}") | |
puts "#{spec_path}/#{spec_name} exists" |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
# Run annotate task after db:migrate | |
# and db:rollback tasks | |
Rake::Task['db:migrate'].enhance do | |
Rake::Task['annotate'].invoke | |
Rake::Task['db:test:prepare'].invoke | |
end | |
Rake::Task['db:rollback'].enhance do | |
Rake::Task['annotate'].invoke | |
Rake::Task['db:test:prepare'].invoke |
MyExceptions = [RangeError, RegexpError, IOError].freeze | |
begin | |
raise IOError, "should be rescued" | |
rescue *MyExceptions => e | |
puts e | |
end |
" open ctag in tab/vertical split | |
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR> | |
map <leader><C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> |
What is a unit in TDD - a unit of work. A use-case in the system.
3 options for a unit of work:
More than just testing the implementation of the code that you're writing, or