View proof.md

Keybase proof

I hereby claim:

  • I am EmilHernvall on github.
  • I am aderyn (https://keybase.io/aderyn) on keybase.
  • I have a public key whose fingerprint is 5B7E 106F 7A1F B3B2 8236 78E1 398A 0566 9E87 493F

To claim this, I am signing this object:

View proxy.py
"""
Install twisted (pip install twisted) and PIL (pip install PIL), and run the script.
On your gateway, run the following commands:
iptables -t nat -A PREROUTING -i br0 -s ! 192.168.0.20 -p tcp --dport 80 -j DNAT --to 192.168.0.20:8080
iptables -t nat -A POSTROUTING -o br0 -s 192.168.0.0/24 -d 192.168.0.20 -j SNAT --to 192.168.0.1
iptables -A FORWARD -s 192.168.0.0/24 -d 192.168.0.20 -i br0 -o br0 -p tcp --dport 8080 -j ACCEPT
Substitute 192.168.0.20 for the computer running the proxy.
"""
View route53_dyndns.py
#!/usr/bin/python
import boto.route53
import os
import sys
import urllib2
import time
def get_zone_id(r53, zone_name):
zone_result = r53.get_hosted_zone_by_name(zone_name)
if not zone_result:
View gist:2332678
import urllib2
import re
import base64
def searchForNext(str, unique):
d = 10
last = str[-d:]
print "searching for continuation of " + last
matches = []
for x in unique:
View data2sound.py
class GlobalFormat(object):
def __init__(self):
self.id = 0x46464952 # RIFF
self.size = 0
self.type = 0x45564157 # WAVE
def as_bin(self):
return struct.pack("III", self.id, self.size, self.type)
View sudoku.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct grid_t_ {
unsigned int grid[81];
struct grid_t_ *next;
} grid_t;
typedef struct sub_t_ {
View LoggingConnection.java
package net.quenchnetworks.panthera.feedimport.util;
import java.util.*;
import java.sql.*;
public class LoggingConnection implements Connection
{
public static class LogEntry
{
public String sql;
View diff.php
<?php
/**
* Calculate differences between two dates with precise semantics. Based on PHPs DateTime::diff()
* implementation by Derick Rethans. Ported to PHP by Emil H, 2011-05-02. No rights reserved.
*
* See here for original code:
* http://svn.php.net/viewvc/php/php-src/trunk/ext/date/lib/tm2unixtime.c?revision=302890&view=markup
* http://svn.php.net/viewvc/php/php-src/trunk/ext/date/lib/interval.c?revision=298973&view=markup
*/
View vector.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vector.h"
void vector_init(vector *v)
{
v->data = NULL;
v->size = 0;
View bigdecoder.py
# bigdecoder.py, by aderyn@gmail.com, 2009-03-01
#
# decoder for .BIG-format files utilized by Red Alert 3 and C&C: Zero Hours
# among others. .big is a trivial archival format. quite frankly, this is
# probably the simplest compound file format imaginable.
#
# this script is written for microsoft windows. it can probably be easily
# adapted for other platforms, but i haven't tried.
#
# file structure: