Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
# To install the Python client library: | |
# pip install -U selenium | |
# Import the Selenium 2 namespace (aka "webdriver") | |
from selenium import webdriver | |
# iPhone | |
driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub') | |
# Android |
import time | |
import boto | |
from boto.s3.connection import Location | |
# | |
# create a couple of strings with our very minimal web content | |
# | |
index_html = """ | |
<html> | |
<head><title>My S3 Webpage</title></head> |
import unittest, os, os.path, sys, urllib | |
import tornado.database | |
import tornado.options | |
from tornado.options import options | |
from tornado.testing import AsyncHTTPTestCase | |
# add application root to sys.path | |
APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
sys.path.append(os.path.join(APP_ROOT, '..')) |
from django.views.generic.base import View, TemplateResponseMixin | |
from django.views.generic.edit import FormMixin, ProcessFormView | |
class MultipleFormsMixin(FormMixin): | |
""" | |
A mixin that provides a way to show and handle several forms in a | |
request. | |
""" | |
form_classes = {} # set the form classes as a mapping |
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import urllib | |
import sys | |
commit_msg = sys.argv[1] | |
with open(commit_msg, 'r+') as f: | |
try: | |
nb_commit = urllib.urlopen("http://whatthecommit.com/index.txt").read() |
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
#!/bin/bash -e | |
#### | |
# Helper script to update the Last modified timestamp of files in a Git SCM | |
# Projects working Copy | |
# | |
# When you clone a Git repository, it sets the timestamp of all the files to the | |
# time when you cloned the repository. | |
# | |
# This becomes a problem when you want the cloned repository, which is part of a | |
# Web application have a proper cacheing mechanism so that it can re-cache files |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc