Skip to content

Instantly share code, notes, and snippets.

View themainframe's full-sized avatar
🕶️
Hacking the Gibson

Damo themainframe

🕶️
Hacking the Gibson
View GitHub Profile
### Keybase proof
I hereby claim:
* I am themainframe on github.
* I am fel (https://keybase.io/fel) on keybase.
* I have a public key whose fingerprint is D385 4112 D034 D00B B907 26A9 A349 CD26 50D6 26CC
To claim this, I am signing this object:
@themainframe
themainframe / dvr_v1.php
Created August 12, 2014 21:08
DVR file_list reader v1
<?php
require __DIR__ . '/../vendor/autoload.php';
// Build a schema that defines the structure of the binary file
$schema = new Binary\Schema;
$schema
// 96 bytes of bullshit at the head of the file
// Probably does have some meaning, but right now be silly and skip it with a Padding field
->addField(
@themainframe
themainframe / keybase.md
Created September 25, 2015 23:11
keybase.md

Keybase proof

I hereby claim:

  • I am themainframe on github.
  • I am fel (https://keybase.io/fel) on keybase.
  • I have a public key whose fingerprint is BBF7 024F 6B87 89C2 9F82 D942 03B1 168E B731 1DF1

To claim this, I am signing this object:

Delivered-To: m4infr4me@gmail.com
Received: by 10.114.71.5 with SMTP id q5csp16278ldu;
Sat, 6 Oct 2012 11:23:12 -0700 (PDT)
Received: by 10.180.87.74 with SMTP id v10mr10532233wiz.21.1349547792331;
Sat, 06 Oct 2012 11:23:12 -0700 (PDT)
Return-Path: <service@paypal.co.uk>
Received: from t8.cs.man.ac.uk (sonoft8.cs.man.ac.uk. [130.88.192.208])
by mx.google.com with ESMTPS id p49si9515602wea.135.2012.10.06.11.23.11
(version=TLSv1/SSLv3 cipher=OTHER);
<?php
/**
* Defines the TFFormField class.
*
* @author Damien Walsh <damien@transcendsolutions.net>
* @copyright Copyright © 2012, Damien Walsh, TranscendSolutions UK
* @package transcendframework
*/
/**
* TFFormField
@themainframe
themainframe / organise.php
Created December 18, 2012 21:30
H.264 DVR backup file bulk-renamer script
<?php
/**
* Organises "ShenZhen" H.264 DVR Rip files into day-folders for easy burning.
* Run interactively with this command:
*
* php organise.php
*
* Example of action:
*
* ./backup01__12142012-14'49'16--12142012-15'01'14.264
Mac-Pro:~ damo$ php
<?php
class A {
function __clone() { clone($this); }
}
@themainframe
themainframe / ExprParser.php
Last active December 10, 2015 04:48
Expression parser in PHP.
<?php
/**
* Expression Parser
* Parses infix expressions using Dijkstra's Shunting Yard algorithm.
*
* @author Damien Walsh <me@damow.net>
* @verson 1.0
*/
header('Content-Type: text/plain');
@themainframe
themainframe / events.json
Last active December 10, 2015 06:18
Events listing as both JSON and XML...
{
"events": {
"52": {
"name": "RockDJ",
"description": "blah"
},
"53": {
"name": "Something else",
"description": "lol"
}
@themainframe
themainframe / next_time.php
Created December 30, 2012 02:10
next_time.php
<?php
/**
* Get the UNIX timestamp of the next instance of a time.
*
* @param int $hours The hours.
* @param int $minutes Optionally, the minutes. Default 0.
* @return int
*/
function next_time($hours, $minutes = 0)