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
@themainframe
themainframe / telegraf.conf
Created June 2, 2020 13:06
Telegraf configuration for APC Smart-UPS UPS SNMP
[[inputs.snmp]]
agents = ["udp://10.10.0.49:161"]
version = 1
community = "public"
[[inputs.snmp.field]]
name = "battery_capacity_percent"
oid = ".1.3.6.1.4.1.318.1.1.1.2.2.1.0"
[[inputs.snmp.field]]
@themainframe
themainframe / appleite.scad
Created June 8, 2019 20:14
Appleite OpenSCAD Definition
module Appleite(xCount=5, yCount=5, holeSize=20, padding=3, depth=10) {
difference() {
holeDistance = holeSize + padding;
cube([
xCount * holeDistance,
yCount * holeDistance - (holeDistance / 2),
depth
]);
@themainframe
themainframe / vmparse.py
Created November 20, 2018 14:32
Send Virgin Media SuperHub 2 DOCSIS Stats to StatsD
#!/usr/bin/env python
#
# Extracts channel information from Virgin Media Super Hub 2 devices
# and exports StatsD measurements.
#
import statsd
import urllib2
import re
from bs4 import BeautifulSoup
@themainframe
themainframe / ilda-test.php
Created October 30, 2016 18:59
php-ilda sample script
<?php
include 'vendor/autoload.php';
use ILDA\FrameReader;
use ILDA\FrameDrawer;
$frameReader = new FrameReader(__DIR__ . '/samples/ILDA12K.ild');
$frame = $frameReader->nextFrame();
$frameDrawer = new FrameDrawer($frame);
$frameDrawer->render(500, 500);
$frameDrawer->savePNG(__DIR__ . '/ILDA12K.png');
@themainframe
themainframe / Dialplan.xml
Created October 16, 2016 22:57
Dialplan.xml
<DIALTEMPLATE>
<TEMPLATE MATCH="999" Timeout="0"/> <!-- Emergency -->
<TEMPLATE MATCH="112" Timeout="0"/> <!-- Emergency -->
<TEMPLATE MATCH="101" Timeout="0"/> <!-- Almost an Emergency -->
<TEMPLATE MATCH="7..." Timeout="0"/> <!-- Asterisk tools -->
<TEMPLATE MATCH="10000" Timeout="0"/> <!-- Sipgate Test -->
<TEMPLATE MATCH="118..." Timeout="0"/> <!-- Men with moustaches et al -->
<TEMPLATE MATCH="116..." Timeout="0"/> <!-- Pan-European Social Help -->
@themainframe
themainframe / dvrsettings.c
Created September 28, 2016 08:15
DVR Settings Retrieval Program
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/**
* H.264 Network DVR
* Settings getter
*
@themainframe
themainframe / buds_guide.md
Last active June 1, 2016 14:34 — forked from anonymous/buds_guide.md
Bud's Guide

Bud's UNIX/Linux Guide

Remember you can get help with any UNIX command with man <command>.

Shell Tips & Shortcuts

Most Linuxes ship with the bash shell.

Files

@themainframe
themainframe / dialplan.xml
Created January 18, 2016 23:25
Cisco 7942 Dialplan
<DIALTEMPLATE>
<TEMPLATE MATCH="999" Timeout="0"/> <!-- Emergency -->
<TEMPLATE MATCH="112" Timeout="0"/> <!-- Emergency -->
<TEMPLATE MATCH="101" Timeout="0"/> <!-- Almost an Emergency -->
<TEMPLATE MATCH="100" Timeout="0"/> <!-- Operator -->
<TEMPLATE MATCH="155" Timeout="0"/> <!-- International Operator -->
<TEMPLATE MATCH="123" Timeout="0"/> <!-- Speaking Clock -->
<TEMPLATE MATCH="118..." Timeout="0"/> <!-- Men with moustaches et al -->
@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:

@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(