Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
class AuthenticationsController < ApplicationController | |
def index | |
if current_user | |
@authentications = current_user.authentications | |
else | |
redirect_to root_path | |
end | |
end | |
def create |
module Delayed | |
module Plugins | |
class Airbrake < Plugin | |
module Notify | |
def error(job, error) | |
::Airbrake.notify_or_ignore(error) | |
super | |
end | |
end |
import os | |
import simplejson | |
import subprocess | |
import datetime | |
f = open('latitude.json', 'r') | |
locdata = simplejson.loads(f.read()); | |
fd = open('latitude.gpx', 'w') | |
fd.write("""# <?xml version="1.0" encoding="UTF-8" standalone="no" ?> |
class ApplicationController < ActionController::Base | |
layout :resolve_layout | |
# .... | |
private | |
def resolve_layout | |
layout ||= params[:layout] | |
layout ||= cookies[:layout] |
import logging | |
from logging.handlers import SysLogHandler import socket | |
def syslogger(hostname, tag): | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
syslog = SysLogHandler(address=('syslogserver', 514), facility="local4") | |
formatter = logging.Formatter(hostname + ' ' + tag + ' %(levelname)s %(message)s') | |
syslog.setFormatter(formatter) | |
logger.addHandler(syslog) |
require 'CSV' | |
require 'rest_client' | |
require 'json' | |
USERNAME="" | |
PASSWORD="" | |
URL_POSTFIX = "&api_user=#{USERNAME}&api_key=#{PASSWORD}" | |
SOURCE_LIST="" | |
NEW_LIST="" | |
CSV_FILE="" |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
# Checkout | |
git tag # List tagged versions | |
git checkout -b prodfix <version> # Checkout specific version into prodfix branch | |
# Fix code and commit | |
# Test in staging (requires compatible database state) | |
git push staging +HEAD:master # Push to staging | |
# Put in producton |
# Option for javac to accept java files with nasty Windows encoding: | |
-encoding cp1252 |
[HKEY_CLASSES_ROOT\Directory\shell\sublime] | |
@="Open Folder as &Sublime Project" | |
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command] | |
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\"" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime] | |
@="Open Folder as &Sublime Project" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command] |