This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
targets=( ${${(f)"$(_call_program targets $words[1] -sT $opt_args[(I)(-N|--nosearch)] ${(kv)opt_args[(I)(-f|--rakefile)]} 2>/dev/null)"}/(#b)rake ([^ ]##) ##\# (*)/${${match[1]}//:/\\:}:${match[2]:l}} ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* vim: set ft=c sw=4 et: */ | |
{ | |
"^u" = "deleteToBeginningOfParagraph:"; | |
"^v" = "pageDown:"; | |
"^w" = "deleteWordBackward:"; | |
"~/" = "complete:"; | |
"~<" = "moveToBeginningOfDocument:"; | |
"~>" = "moveToEndOfDocument:"; | |
"~b" = "moveWordBackward:"; | |
"~d" = "deleteWordForward:"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Place in ~/.vim/after/plugin/speeddating.vim | |
" In Vim, -4 % 3 == -1. Let's return 2 instead. | |
function! s:mod(a,b) | |
if (a:a < 0 && a:b > 0 || a:a > 0 && a:b < 0) && a:a % a:b != 0 | |
return (a:a % a:b) + a:b | |
else | |
return a:a % a:b | |
endif | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sprockets::Helpers::RailsHelper::AssetPaths.class_eval do | |
class MissingAssetError < StandardError; end | |
def digest_for_with_presence_check(logical_path) | |
unless asset_environment[logical_path] | |
raise MissingAssetError.new("#{logical_path} doesn't exist") | |
end | |
digest_for_without_presence_check(logical_path) | |
end | |
alias_method_chain :digest_for, :presence_check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add config/overrides/*.yml to .gitignore | |
# and this near the top of application.rb | |
%w(defaults overrides).each do |type| | |
path = File.expand_path("../#{type}/#{Rails.env}.yml", __FILE__) | |
ENV.update(YAML.load_file(path)) if File.exist?(path) | |
end | |
# For things that are sensitive or developer dependent: | |
# config/overrides/{development,test}.yml | |
# For everything else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:join(cmd) | |
if exists(':SplitjoinJoin') && !v:count | |
let tick = b:changedtick | |
SplitjoinJoin | |
if tick == b:changedtick | |
execute 'normal! '.a:cmd | |
endif | |
else | |
execute 'normal! '.v:count.a:cmd | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine api.heroku.com | |
login my@email.com | |
password 01230123012301230123012301230123 | |
machine api.github.com password something login somebody | |
machine ftp.server login abc password def account ghi macdef somemacro | |
cd somehwhere | |
continues until end of paragraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Install in PATH as foremux | |
if %w(help --help -h).include?(ARGV.first) | |
$stderr.puts <<-help | |
Usage: | |
foremux [PROCESS] | |
Options: | |
-e, [--env=ENV] # Specify an env file to load, defaults to .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[extensions] | |
color = |