I hereby claim:
- I am petehamilton on github.
- I am petehamilton (https://keybase.io/petehamilton) on keybase.
- I have a public key whose fingerprint is 7809 8DC6 825F 4184 8139 C43B 0621 AE2E 2952 C17E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#Handy Git stuff | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
function git-track { | |
CURRENT_BRANCH=$(parse_git_branch) | |
git-config branch.$CURRENT_BRANCH.remote $1 | |
git-config branch.$CURRENT_BRANCH.merge refs/heads/$CURRENT_BRANCH | |
} |
#! /usr/bin/ruby | |
# Recommend saving (or symlinking) as /usr/bin/uta-helper | |
################################################################################ | |
# | |
# Simple ruby script to pull down student code for excercises from labranch | |
# | |
# Example: $ uta-helper pull -e html | |
# Will clone all the repos into a 'respositories' directory by default. |
# sample_digest_email.yml | |
# Parses with the digest_email (http://peterhamilton.github.com/digest_email) gem | |
# See the result of running this file through the gem here: http://docsoc.s3.amazonaws.com/sample/sample_digest_email.html | |
header: | |
title: "Weekly Digest" | |
subtitle: November 12th 2012 | |
subsubtitle: | |
items: | |
- list_title: New, Easy Email Digests |
# Example of rendered digest: http://docsoc.s3.amazonaws.com/sample/sample_digest_email.html | |
# Github Repo for digest email generator: https://github.com/PeterHamilton/digest-email | |
# Instructions: | |
# 1. Download this file | |
# 2. Fill it in (minus image URL, unless you have one) | |
# 3. Send a 150px wide image + the file to me | |
- list_title: This text will go in the top list of posts | |
image: https://s3-eu-west-1.amazonaws.com/docsoc/sample/suitcase.jpg |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
/** | |
* A class to demonstrate finding potential passwords made from Leetspeak | |
* | |
* BACKSTORY: | |
* You overhear someone in the office mention their password out loud. |
#!/usr/env/ruby | |
mappings = { | |
1 => 'Kelly\'s Eye', | |
2 => 'One Little Duck', | |
3 => 'Cup of Tea', | |
4 => 'Knock at the Door', | |
5 => 'Man Alive', | |
6 => 'Tom Mix', | |
7 => 'Lucky', | |
8 => 'Garden Gate', |
find . -name '*.git' -execdir sh -c 'cd {} && git gc' \; # Compress all git repos under current directory |
#!/bin/bash | |
EXAMS_URL="https://exams.doc.ic.ac.uk/" | |
echo "##############################################" | |
echo "# Exam Results Checker" | |
echo "##############################################" | |
echo -ne "Username: " | |
read username | |
stty -echo |