git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<?php | |
/** | |
* Yii, simple HMVC | |
*/ | |
class HmvcController extends Controller | |
{ | |
public function actionIndex() | |
{ | |
echo $this->execute('/hmvc/do/id/123'); | |
} |
# ~/.gitconfig | |
[branch] | |
autosetupmerge = true | |
[push] | |
default = current | |
[core] | |
excludesfile = .gitignore |
$ easy_install -U virtualenv | |
# Create a sandbox | |
$ virtualenv --no-site-packages myenv | |
$ cd myenv | |
# Install Paste Script | |
$ bin/pip install PasteScript |
import mechanize | |
import urllib | |
BASE_URL = 'http://my-reddit' | |
THREAD = BASE_URL + '/r/reddit/particular-thread' | |
class Transaction(object): | |
def __init__(self): | |
self.user = 'redditor' | |
self.pass = 'password' |
# This buildout.cfg should work to run Zope as a WSGI process | |
[buildout] | |
extends = http://dist.plone.org/release/4.1-latest/versions.cfg | |
parts = instance paster wsgiconfig | |
[instance] | |
recipe = plone.recipe.zope2instance | |
eggs = | |
Plone |
export PGPORT ?= 4488 | |
PG_PATH ?= $(shell if test -d /usr/lib/postgresql/9.1; then echo /usr/lib/postgresql/9.1; else echo /usr/lib/postgresql/8.4; fi) | |
PG_DIR = ${PWD}/instance/var | |
PG_DATA = ${PG_DIR}/data | |
PG_RUN = ${PG_DIR}/run | |
PG_LOG = ${PG_DIR}/log | |
PG_SOCKET = ${PG_RUN}/.s.PGSQL.${PGPORT} | |
PGPARAMS = -D ${PG_DATA} -o "-F -c unix_socket_directory=${PG_RUN} -c custom_variable_classes='busy' -c busy.active_user=0" -l ${PG_LOG}/pg.log | |
# -*- coding: utf-8 -*- | |
# $Id: offline_bootstrap.py 73407 2011-08-21 20:35:04Z glenfant $ | |
"""Offline buildout bootstraping for use on installation targets with no | |
Internet access. | |
See http://glenfant.wordpress.com/2011/07/31/bootstrap-and-install-a-buildout-based-project-without-internet-connection/ | |
We assume that the directory that contains this file has the following | |
structure: |
#!/bin/bash | |
## Install Git ######################################### | |
apt-get install git | |
## Install Ant ######################################### | |
apt-get install ant | |
## Install Jenkins ##################################### |
#!/bin/bash | |
# Send Munin generated Varnish statistics by e-mail | |
VARNISH_LOCATION="Tokyo" | |
REPORT_PATH=/var/www/html/munin/localhost/localhost | |
EMAIL_RECIPIENT="[email protected]" | |
EMAIL_SUBJECT="Varnish Weekly Statistics" | |
EMAIL_BODY="Weekly statistics attached." | |
hash mutt 2>&- || { echo -e >&2 "\nMutt not installed, aborting.\n"; exit 1; } |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream