Useful Shortcuts (Mac OS X)
| ⌘T | go to file
| ⌘⌃P | go to project
| ⌘R | go to methods
| ⌃G | go to line
| ⌘KB | toggle side bar
# encoding: utf-8 | |
module SortableHelper | |
def sortable column, title = nil, remote = true | |
title ||= column.titleize | |
css_class = column == sort_column ? "current #{sort_direction}" : nil | |
direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc" | |
link_to title, plumb(sort: column, direction: direction, page: nil), {:class => css_class} | |
end | |
end |
# encoding: utf-8 | |
module FormHelper | |
def form_error?(obj, method) | |
obj.errors[method].empty? ? '' : 'error' | |
end | |
def form_errors(obj, method) | |
obj.errors[method].join ' ' | |
end | |
end |
DEFAULT_COLOR="[00m" | |
GRAY_COLOR="[37m" | |
PINK_COLOR="[35m" | |
GREEN_COLOR="[32m" | |
ORANGE_COLOR="[33m" | |
RED_COLOR="[31m" | |
if [ `id -u` == '0' ]; then | |
USER_COLOR=$RED_COLOR | |
else | |
USER_COLOR=$PINK_COLOR |
function scp-dotfiles () { | |
if [ -z "$1" ]; then | |
return | |
fi | |
echo -n $'syncing files to ' | |
echo -n `set_color $RED_COLOR` | |
echo -n $1 | |
echo `set_color $DEFAULT_COLOR` | |
scp ~/.dot-files/.srv_bashrc $1:~/.bashrc | |
scp ~/.dot-files/.srv_bash_aliases $1:~/.bash_aliases |
worker_processes 1; | |
error_log /usr/local/etc/nginx/logs/error.log debug; | |
#pid logs/nginx.pid; | |
events { | |
worker_connections 128; | |
} |
server { | |
listen 8080; | |
server_name reckoning.dev; | |
location / { | |
root ~/dev/work/mortik/reckoning/public; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
if (!-f $request_filename) { |