Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
(function() { | |
// Underscore methods that we want to implement on Array. | |
var methods = [ | |
'all', | |
'any', | |
'compact', | |
'contains', | |
'countBy', | |
'detect', | |
'difference', |
class BmodelGenerator < Rails::Generators::NamedBase | |
source_root File.expand_path('../templates', __FILE__) | |
argument :url, type: :string, default: 'url-goes-here' | |
def generate_view | |
template "model.js.erb", File.join('app', 'assets', 'javascripts', 'models', "#{file_name}.js") | |
%x{echo //= require models/#{file_name} | pbcopy} | |
%x{#{ENV['EDITOR']} #{File.join('app', 'assets', 'javascripts', 'application.js')}} | |
end |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
[alias] | |
bam = "!source ~/.githelpers && delete_local_merged_branches" | |
bamr = "!source ~/.githelpers && delete_remote_merged_branches" |
$ rake test | |
/opt/rubies/2.0.0-p0/bin/ruby -I"lib:test" -w -I"/Users/steve/.gem/ruby/2.0.0/gems/rake-10.0.4/lib" "/Users/steve/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_test_loader.rb" "test/map_stream_test.rb" "test/map_test.rb" "test/merge_test.rb" "test/mvp_test.rb" "test/on_value_test.rb" "test/select_test.rb" | |
/Users/steve/.gem/ruby/2.0.0/gems/simplecov-html-0.7.1/lib/simplecov-html.rb:57: warning: assigned but unused variable - title_id | |
/Users/steve/.gem/ruby/2.0.0/gems/coveralls-0.6.7/lib/coveralls.rb:66: warning: `&' interpreted as argument prefix | |
/Users/steve/.gem/ruby/2.0.0/gems/coveralls-0.6.7/lib/coveralls.rb:72: warning: `&' interpreted as argument prefix | |
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:157: warning: assigned but unused variable - message | |
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:167: warning: assigned but unused variable - message | |
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/response. |
# whyspooler.rb | |
# mostly a translation of _why's OCaml script to Ruby | |
# | |
# polls whytheluckystiff.net for new printouts, converts to pdf, saves them into ./SPOOL, and prints them | |
# | |
# usage: `ruby whyspooler.rb http://whytheluckystiff.net` | |
# | |
# OS X install instructions: | |
# 1. `gem install open4` | |
# 2. download MacPCLtoPDF.zip from http://www.columbia.edu/~em36/pcltopdf.html |
# `git merge-log` shows the commits that were introduced in a given merge | |
# `git merge-diff` shows the actual changes that were introduced by a given merge | |
# Both commands accept an optional commitish; if ommitted, the last merge commit is used | |
merge-span = "!f() { echo $(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f1)$1$(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f2); }; f" | |
merge-log = "!git log `git merge-span .. $1`" | |
merge-diff = "!git diff `git merge-span ... $1`" | |
merge-difftool = "!git difftool `git merge-span ... $1`" |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work: