Skip to content

Instantly share code, notes, and snippets.

View alister's full-sized avatar
🏠
Working from home

Alister Bulman alister

🏠
Working from home
View GitHub Profile
@alister
alister / gist:905493
Created April 6, 2011 11:24
Intern/Graduate developers at Peerindex.net, London. UK

Intern/Graduate developers

Want to work on platform that processes 100m's edge social graphs to extract the conversation graph? One that looks at activity across the social web to discover interests and authorities? On where spinning up 20 cloud-based servers and pulling down gigabytes of data to efficiently process via algorithms is considered a normal day?

If so, PeerIndex is looking for bright, eager to learn developers for graduate and intern developer positions here at PeerIndex.

Who Are We?

PeerIndex (www.peerindex.net) is based at the TechHub in the Silicon Roundabout, leading the way to help global companies and local individuals understand the impact of their conversations on the social web and beyond.

PeerIndex is a fast paced and intense environment where you will be developing using continuous integration and deployment managed using KanBan. The PI Engineering team is small, focused and efficient - giving every member the ability to make as much impac

@alister
alister / put_get_pheanstalk.php
Created November 22, 2011 14:44
put/get Pheanstalkd
<?php
// register Pheanstalk class loader
require_once 'pheanstalk_init.php';
$pheanstalk = new Pheanstalk('127.0.0.1');
// ----------------------------------------
// producer (queues jobs)
$pheanstalk
@alister
alister / gist:1385819
Created November 22, 2011 14:46
Pheanstalkd_putTask
<?php
function putTask(
$data,
$priority,
$delay = 0,
$tube = 'default',
$canIgnore = false
) {
$taskInfo = array('task' => $data,
'_queuedAt' => time(),
@alister
alister / gist:1385857
Created November 22, 2011 15:00
svnExport.sh
#!/bin/sh
REV=1914
REVDIR=$REV.20080214.1914
REPOSITORY=svn+ssh://[email protected]/var/svn/SITEURL/trunk
IMAGES=$REVDIR/htdocs/i
STATIC1=$REVDIR/example.co.uk
svn export --revision $REV $REPOSITORY $REVDIR
@alister
alister / ExampleCodingStandard.php
Created November 22, 2011 15:27
php code sniffer extension
<?php
// in the ..../Example/ directory
require_once 'PHP/CodeSniffer/Standards/CodingStandard.php';
class PHP_CodeSniffer_Standards_Example_ExampleCodingStandard
extends PHP_CodeSniffer_Standards_CodingStandard
{
function getIncludedSniffs()
{
return array(
#!/bin/sh
# we have to give the full path to the file called Example/ExampleCodingStandard.php
# $(pwd)/ is just Bash-ish for outputting the current directory name
phpcs --standard=$(pwd)/Example /path/to/file/to/check/
@alister
alister / rsyncPhpNet.sh
Created November 22, 2011 15:46
rsyncPhpNet to a local dir
#!/bin/sh
rsync -avzC --timeout=600 --delete --delete-after \
rsync.php.net::phpweb /web/Hosts/php.local \
--include='manual/en/' --include='manual/en/**' \
--exclude='manual/**' --exclude='distributions/**'
<?php
// bootstrap the DB access and configs...
// .....
$m = new ParseBounces();
require_once 'Zend/Mail/Storage/Maildir.php';
try {
$mail = new Zend_Mail_Storage_Maildir(
array('dirname' => $bounceMaildir)
<?php
// bootstrap the DB access and configs...
// .....
$m = new ParseBounces();
require_once 'Zend/Mail/Storage/Maildir/Writeable.php';
try {
$mail = new Zend_Mail_Storage_Maildir_Writeable(
array('dirname' => $bounceMaildir)
#!/bin/sh
DIR=`readlink -f $0`
DIR=`dirname $DIR`
DIR=`readlink -f $DIR/..`
# ignoring the .svn subdirs, *.sh files, temp files or backups
# find files changed in the last day
FIND=`find $DIR/ -mtime 0 ! -name '*\.sh' ! -iname '\.bak'
! -iname '*~' -type f ! -name \.svn \