create linode server instance
local:
<shell>$ssh root@(IP ADDRESS)
remote:
# Make it use C-a, similar to screen.. | |
unbind C-b | |
unbind l | |
set -g prefix C-a | |
bind-key C-a last-window | |
# Reload key | |
bind r source-file ~/.tmux.conf | |
set -g history-limit 1000 |
[alias] | |
humiliate = "!sh -c 'RECIPIENTS=`git blame $0 -e -L $1 | sed \"s/.* (<\\(.*\\)> .*/\\1/\" | sort | uniq | paste -sd \",\" -` ; git blame $0 -L $1 | mail -s \"WTF is this?\" $RECIPIENTS;'" |
from django.conf.urls import include, patterns, url as django_url | |
import re | |
def url(pattern, view, kwargs=None, name=None, prefix='', constraints={}): | |
''' | |
url('/path/:id/to/:something/', some_view, constraints={'id': r'\d{4}'}) | |
''' | |
def convert(match): | |
name = match.group(1) |
# 2010-10-01 | |
# | |
# Mac OS X 10.6.3 | |
# Homebrew 0.7 | |
# Xcode 3.2.4 | |
# Git 1.7.3.1 | |
# RVM 1.0.12 | |
# Ruby 1.9.2, 1.8.7 | |
# Rails 3.0.0 | |
# Passenger 3.0.0.pre4 |
# -*- coding: utf-8 -*- | |
class Imposto(object): | |
def __init__(self, rendimento_anual_bruto): | |
self.rendimento_anual_bruto = rendimento_anual_bruto | |
self.rendimento_anual_de_incidencia = self.rendimento_anual_bruto * self.TAXA_DE_INCIDENCIA | |
self.rendimento_mensal_bruto = rendimento_anual_bruto /12 | |
self.rendimento_mensal_de_incidencia = self.rendimento_anual_de_incidencia /12 | |
class SegurancaSocial(Imposto): |
Here's how to install PostgreSQL and have it run automatically at startup, on an Ubuntu 10.04 virtual machine using Vagrant. This took me a while to figure out:
Add the default lucid32 base box to your vagrant, if you haven't already:
host> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
Now make a new lucid32 virtual machine and install postgresql on it:
These commands are good as of 2010-11-18.
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
http://developer.apple.com/technology/xcode.html