Set up the master bare repo in your home directory..
cd ~
git init --bare my-repo
git repo-config core.sharedRepository true
cd my-repo/hooks
| <!doctype html> | |
| <html> | |
| <head> | |
| <style type="text/css"> | |
| .container { width: 40%; margin: 0 auto; background-color: #DDF; height: 400px; padding: 10px 0;} | |
| .textbox { width: 100%; padding: 4px; border-width: 1px; } | |
| .text-wrapper { padding: 0 10px; margin-left: -10px; } | |
| </style> | |
| </head> | |
| <body> |
| <?php | |
| //... | |
| function update($dao = false, $convertTimeToUTC = true) { | |
| //... | |
| } | |
| ?> |
| # Convert dashed, lowercase title to proper title | |
| dashToTitleCase = (title) -> | |
| properCase dashToSpace title | |
| # Capitalize each space-separated word in the string | |
| properCase = (xs) -> | |
| xs.replace( | |
| /\w\S*/g, | |
| (xs) -> xs.charAt(0).toUpperCase() + xs.substr(1).toLowerCase() | |
| ) |
| def my_func(): | |
| return "embedding?" |
| PAGE="http://my.site.com/" | |
| SEARCH="new-content" | |
| CONTENT=`curl -# $PAGE | grep $SEARCH` | |
| while [ -z "$CONTENT" ] | |
| do | |
| sleep 8 | |
| CONTENT=`curl -# $PAGE | grep $SEARCH` | |
| done |
| # Set the next three lines to get the appropriate binary download from here: | |
| # http://pypy.org/download.html | |
| PYPY_VERSION="pypy-1.9" | |
| PYPY_TAR=$PYPY_VERSION"-osx64.tar.bz2" | |
| PYPY_URL="https://bitbucket.org/pypy/pypy/downloads/"$PYPY_TAR | |
| # Target folder where pypy package will live | |
| SRC_DIR=$HOME"/src" | |
| PYPY_DIR=$SRC_DIR"/"$PYPY_VERSION |
| <?php | |
| $query->update(function(&$row){ | |
| if ($row['my_name'] === 'tester') $row['my_name'] = 'random dude'; | |
| })->rowCount(); |
| <?php | |
| // call this on a list of PDF's to convert, eg: | |
| // $ find public_html/upload/rig -name '*.pdf' -print0 | xargs -0 php bin/convert_images.php $1 | |
| set_time_limit(5*60); // give it 5 minutes | |
| $root_dir = dirname(dirname(__FILE__)); | |
| $filelist = array_slice($argv, 1); | |
| $process = true; // actually process the files? | |
| $reprocess = false; // reprocessed already processed files? |
| #!/bin/sh | |
| # | |
| # This script was written by Toby White under an unknown license, and published | |
| # on the Git mailing list: | |
| # | |
| # http://kerneltrap.org/mailarchive/git/2007/11/21/435536 | |
| # | |
| # Superficial changes were made by Nathan de Vries to allow the script to be | |
| # run under Leopard. | |
| # |