Skip to content

Instantly share code, notes, and snippets.

View PeterJCLaw's full-sized avatar

Peter Law PeterJCLaw

  • Marks & Spencer
  • United Kingdom
View GitHub Profile
THINGS TO OCCUR
Thursday (small team of 2-3)
* If seating is out, retract seating
* Mark out layout in Cube & Bar 2
* DJ riser
* Power
* Network
* Verify facilities (projector etc)
<pre>
<?php
require_once('iterator.class.php');
class MyIterator extends BaseIterator
{
protected function getNextValue()
{
// var_dump(__METHOD__);
def call(f, *args, **kwargs):
def g(event):
if f.can_accept_event:
args.insert(0, event)
return f(*args, **kwargs)
return g
def call(f, *args, **kwargs):
def g(event):
if f.can_accept_event:
args.insert(0, event)
return f(*args, **kwargs)
return g
import prime
def find(i):
# odd numbers
if i % 2 == 1:
return (i-1)/2, 2
# divides by a prime
for pn in range(2, 1001):
# skip 2 - even ones don't work like this.
$ sudo slapcat
dn: dc=sr
objectClass: top
objectClass: dcObject
objectClass: organization
o: sr
dc: sr
structuralObjectClass: organization
entryUUID: 91cee75e-4115-1030-8293-f570b4018f38
creatorsName: cn=admin,dc=sr
$ git l
* commit d7ef96f11961a5c7e4d01b8ad975c83f03371bbc
|\ Merge: 36dcb9d 00fb5c4
| | Author: Apache <apache@optimusprime.ecs.soton.ac.uk>
| | Date: Fri Oct 29 21:01:03 2010 +0100
| |
| | Merge remote branch 'origin/master'
| |
| * commit 00fb5c432b0dc46ed267d6cf6a7591f3c1a6e080
| |\ Merge: fa2ef57 14b88c9
public void Do()
{
string boo = "boo";
Thread t = new Thread((x) => { boo = "flame"; });
Console.WriteLine(boo);
// boo
t.Start();
t.Join();
<?php /**
* Get information about the user
*/
public function getInfo()
{
$output = Output::getInstance();
$auth = $this->ensureAuthed();
$teamNumbers = $auth->getCurrentUserTeams();
$teams = array();
@PeterJCLaw
PeterJCLaw / fetchzip.py
Created December 12, 2011 21:19
A file to fetch a zip from the SR IDE
#!/usr/bin/env python
import urllib2
import Cookie
import json
import config
IDE = config.URL