Skip to content

Instantly share code, notes, and snippets.

View nikdoof's full-sized avatar
👋

Andrew Williams nikdoof

👋
View GitHub Profile
@nikdoof
nikdoof / pmotd20140307.py
Last active August 29, 2015 13:57
Problem Of The Day 2014/03/07 - Matrix Rotation
# Problem of the Day - 2014/03/07
# http://www.problemotd.com/problem/matrix-rotation/
#
# By Andrew Williams
from datetime import datetime
start = [[1,2,3,4,5],
[6,7,8,9,10],
[11,12,13,14,15],
@nikdoof
nikdoof / pmotd20130306.py
Last active August 29, 2015 13:57
Brute force solver for Problem Of The Day 2014/03/06
# Vigenere Cipher brute forcer
#
# Solution to http://www.problemotd.com/problem/vigenere-cipher/
# By Andrew Williams (github.com/nikdoof)
import itertools, string
alpha = string.ascii_lowercase
def vigenere_encode(text, key):
@nikdoof
nikdoof / sendim.py
Created October 8, 2012 10:07
Send a IM from Android with SL4A and Python
import sys, xmpp
import android
droid = android.Android()
# Default configuration options
config = {
'server': ('talk.google.com', 5223),
'IM_PRIORITY': 0,
'IM_TYPE': 'chat',
'IM_STATUS': 'Quick message...',
@nikdoof
nikdoof / mkv2mp4.sh
Created October 7, 2012 18:51
Script to remux MKVs to MP4s
#!/bin/bash
if [ "$1" == "" ]; then
echo "Usage: $0 <file>"
exit 0
fi
tempdir="/home/torrent/temp"
MKTMP="mktemp -u -p ${tempdir}"