Skip to content

Instantly share code, notes, and snippets.

View rfc1459's full-sized avatar
🏴‍☠️
ARRRRRRR

Matteo Panella rfc1459

🏴‍☠️
ARRRRRRR
View GitHub Profile
@rfc1459
rfc1459 / eternal.py
Created April 4, 2011 21:33
In L'Aquila we're still waiting for Apr 7 00:00:00 2009...
#!/usr/bin/env python
# In L'Aquila we're still waiting for Apr 7 00:00:00 2009...
import time
__all__ = ['eternal_april']
_APRIL_MIDNIGHT = 1238968800.0
def eternal_april(ts=None):
@rfc1459
rfc1459 / knockmac.py
Created April 27, 2011 21:20
Simple Packet Authentication client for xt_pknock
#!/usr/bin/env python
import hashlib
import hmac
import re
import struct
import socket
from socket import AF_INET, SOCK_DGRAM
import sys
import urllib2
@rfc1459
rfc1459 / tld_tab.h
Created May 10, 2011 16:45
Sample tldgen output
/*
* Azzurra IRC Services (C) 2001-2011 Azzurra IRC Network
*
* This program is free but copyrighted software; see COPYING for details.
*
* tld_tab.h - DFA state matrix for TLD check
* THIS FILE IS AUTOGENERATED - DO NOT EDIT!
*/
#ifndef I_HAVE_A_VERY_GOOD_REASON_TO_INCLUDE_TLD_TAB_H
@rfc1459
rfc1459 / WEBIRC v2 Draft.md
Created May 12, 2011 20:42
WEBIRC Protocol Version 2 Draft
@rfc1459
rfc1459 / .gitignore
Created June 29, 2011 13:18 — forked from ento/buildlibxml.diff
Installing lxml on a Mac OS X 10.6 that has no PPC support (read: Xcode 4)
/lxml-*/
lxml-*.tar.gz
@rfc1459
rfc1459 / cloak.c
Created July 3, 2011 22:07
SHA1 - mixed C89/C99
/* CUT */
#define SHABUFLEN (SHA1_DIGEST_LENGTH * 2)
char *sha1_hash(const char *s, size_t size) {
static char shabuf[SHABUFLEN + 1];
unsigned char digestbuf[SHA1_DIGEST_LENGTH];
int i;
@rfc1459
rfc1459 / to-flac.py
Created January 27, 2012 18:30
Damn iTunes Store...
#!/usr/bin/python -u
# Quick and dirty script to transcode to FLAC all AAC-LC files
# rooted into the current working directory (subdirs incl.)
import os
import sys
import subprocess
import magic
@rfc1459
rfc1459 / clock.c
Created April 4, 2012 15:46
FFFFFUUUUU
static void clk_disable_locked(struct clk *c)
{
if (c->refcnt == 0) {
WARN(1, "Attempting to disable clock %s with refcnt 0", c->name);
return;
}
if (c->refcnt == 1) {
if (c->ops && c->ops->disable) {
trace_clock_disable(c->name, 0, 0);
c->ops->disable(c);
@rfc1459
rfc1459 / resize.sh
Created July 29, 2012 16:14
Programmatically resize banners for MOCA app
#!/bin/bash
IMAGES=$@
resize() {
local DENSITY=$1
shift
local SIZE=$1
shift
local UNSHARP=$1
@rfc1459
rfc1459 / 99-supersu.sh
Last active December 10, 2015 09:59
SuperSU (Pro) backup script for CM10.1
#!/sbin/sh
#
# /system/addon.d/99-supersu.sh
# During a CM10 upgrade, this script backs up SuperSU-related files,
# /system is formatted and reinstalled, then the files are restored.
#
. /tmp/backuptool.functions
list_files() {