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
def habtm_checkboxes(obj, column, assignment_objects, assignment_object_display_column, label_css_class) | |
obj_to_s = obj.class.to_s.split("::").last.underscore | |
field_name = "#{obj_to_s}[#{column}][]" | |
html = hidden_field_tag(field_name, "") | |
html += "\n" | |
assignment_objects.each do |assignment_obj| | |
cbx_id = "#{obj_to_s}_#{column}_#{assignment_obj.id}" | |
cbx = check_box_tag field_name, assignment_obj.id, obj.send(column).include?(assignment_obj.id), :id => cbx_id | |
html += label_tag cbx_id, h(assignment_obj.send(assignment_object_display_column)) + " " + h(cbx), :class => label_css_class + ' checkbox' |
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
" Get off my lawn | |
nnoremap <Left> :echoe "Use h"<CR> | |
nnoremap <Right> :echoe "Use l"<CR> | |
nnoremap <Up> :echoe "Use k"<CR> | |
nnoremap <Down> :echoe "Use j"<CR> |
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
16 17 * * 1-5 /usr/local/bin/growlnotify -m "25 minutes until the 5:41 train (express)" | |
35 17 * * 1-5 /usr/local/bin/growlnotify -m "25 minutes until the 6:01 train" | |
03 18 * * 1-5 /usr/local/bin/growlnotify -m "25 minutes until the 6:38 train" | |
59 18 * * 1-5 /usr/local/bin/growlnotify -m "25 minutes until the 7:24 train" | |
16 20 * * 1-5 /usr/local/bin/growlnotify -m "25 minutes until the 8:41 train" |
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
def drink | |
don << Bourbon.new | |
drink if don.standing? | |
end |
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
#!/bin/sh | |
jq -c '.[]' params.json | while read i; do | |
aws ssm put-parameter --cli-input-json $i | |
done |