This file contains hidden or 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
inoremap <buffer> ;fu function() {<CR>}<Esc>V<<Esc>O | |
inoremap <buffer> ;cl console.log();<Esc>hi | |
inoremap <buffer> ;al alert();<Esc>hi | |
inoremap <buffer> ;rf return false;<Esc> |
This file contains hidden or 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
hi Todo guifg=#ffffff guibg=#bb0000 gui=NONE ctermfg=white ctermbg=NONE cterm=NONE | |
match Todo /\s\+$/ |
This file contains hidden or 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
boolean_value = true | |
first_string = "" | |
second_string = "" | |
# not working, since this is an assignment | |
(boolean_value ? first_string : second_string) = 'lol' | |
# working, since `replace` is a method | |
(boolean_value ? first_string : second_string).replace 'lol' |
This file contains hidden or 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
#!/bin/bash | |
`brew --prefix gettext`/bin/msgfmt -c -o fichier.mo fichier.po |
This file contains hidden or 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
array('Pinboard', 'bookmarks', array( | |
'username' => '__username__', | |
'total' => 10, | |
'title' => 'Pinboard', | |
'description' => 'latest bookmarks', | |
'secret' => '__secret__', | |
) | |
), |
This file contains hidden or 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 bash | |
tmux split-window | |
tmux split-window | |
tmux split-window | |
tmux select-layout tiled | |
tmux send-keys -t 0 cd\ ~/Code | |
tmux send-keys -t 0 Enter | |
tmux send-keys -t 1 cd\ ~/Music | |
tmux send-keys -t 1 Enter | |
tmux send-keys -t 2 cd\ ~/Dropbox |
This file contains hidden or 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 | |
require "open-uri" | |
if ARGV.first | |
build_id = ARGV.first | |
else | |
build_id = open("http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/LAST_CHANGE") { |data| data.read } | |
end | |
build_url = "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/#{build_id}/chrome-mac.zip" |
This file contains hidden or 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
bind % send-keys " split-tmux -h" \; send-keys "Enter" | |
bind s send-keys " split-tmux -v" \; send-keys "Enter" |
This file contains hidden or 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
# Usage: rails g migration add_some_other_stuff O | |
alias -g O='| open-after-migration' |
This file contains hidden or 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 | |
gemset = `rvm gemset name`.chomp | |
if gemset == "global" and ARGV.first == "install" | |
print "It looks like you are about to install a gem in the global gemset.\n" | |
print "Are you sure? (Y/n) " | |
exit(1) unless STDIN.gets =~ /y/i | |
end | |
system("~/.rvm/bin/gem #{ARGV.join(" ")}") |