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 / 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 / mediaboxAdv-1.3.4b.js
Created April 4, 2013 17:39
Mediabox modifications
/*
mediaboxAdvanced v1.3.4b - The ultimate extension of Slimbox and Mediabox; an all-media script
updated 2010.09.21
(c) 2007-2010 John Einselen <http://iaian7.com>
based on Slimbox v1.64 - The ultimate lightweight Lightbox clone
(c) 2007-2008 Christophe Beyls <http://www.digitalia.be>
MIT-style license.
*/
var Mediabox;
@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 / fb.php
Last active May 6, 2018 11:26
Facebook message extractor
<?php
/**
* Extract the messages from that awful HTML file Facebook gives you when
* you request an archive of your data.
*
* Writes them to a database.
*
* @author Damien Walsh <me@damow.net>
* @license MIT
*/
@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 / lmg7401plbc.txt
Last active February 4, 2018 00:50
A description of the LG7401PLBC Display Module.
LMG7401PLBC Display Module
160x60 graphic dot-matrix LCD
Chips:
1 x Hitachi HD61830B Dot Controller
1 x Winbond W24655 Static RAM (SRAM) 1KB
5 x SANYO LC7940N Segment Driver
Schematic:
@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 / 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