Skip to content

Instantly share code, notes, and snippets.

View LongHairedHacker's full-sized avatar

Sebastian LongHairedHacker

View GitHub Profile
@LongHairedHacker
LongHairedHacker / ic273.json
Created December 31, 2016 15:39
Daten von der 33C3 Rückfahrt im IC273
[
{
"version":"1.9",
"time":"1483127520",
"age":"0",
"latitude":"50.901438",
"longitude":"9.583847",
"altitude":"323.2",
"speed":"68.179",
"cmg":"175.07",
@LongHairedHacker
LongHairedHacker / qnd_bom.py
Created March 8, 2017 16:08
Quick and Dirty Kicad BOM
#!/usr/bin/env python3
import sys
import xml.etree.ElementTree as ET
DISTRIBUTER_FIELD = 'Mouser'
component_list = {}
@LongHairedHacker
LongHairedHacker / INSTALL.md
Last active April 10, 2017 14:59
Installing zfsonlinux for the Devuan Beta

Installing zsfonlinux under Devuan

HACK - Not recommended for production !

wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_8_all.deb
dpkg --unpack zfsonlinux_8_all.deb
vim /var/lib/dpkg/info/zfsonlinux.postinst
Looking at https://github.com/bup/bup/blob/master/t/test-sparse-files.sh#L46
restore_size=$(WVPASS du -k -s restore | WVPASS cut -f1) || exit $?
WVPASS [ "$restore_size" -ge "$((data_size / 1024))" ]
For a block size of 4096 bytes:
data_size = block_size * 10 = 40960
File is created using:
WVPASS dd if=/dev/zero of=src/foo seek="$data_size" bs=1 count=1
@LongHairedHacker
LongHairedHacker / edgy_twitter.js
Last active June 22, 2017 14:17
None of that round corner rubbish
// ==UserScript==
// @name Edgy Twitter
// @namespace https://twitter.com/l_h_hacker
// @version 19.84
// @description None of that round corner rubbish
// @author sebastian (@l_h_hacker)
// @include https://twitter.com/*
// @grant none
// ==/UserScript==
88.198.21.48 - - [02/Aug/2017:22:37:53 +0000] "HEAD / HTTP/1.1" 200 0 "-" "http.rb/2.2.2 (Mastodon/1.4.7; +http://social.troll.academy/)"
88.198.21.48 - - [02/Aug/2017:22:37:53 +0000] "GET / HTTP/1.1" 200 7116 "-" "http.rb/2.2.2 (Mastodon/1.4.7; +http://social.troll.academy/)"
163.172.71.138 - - [02/Aug/2017:22:37:54 +0000] "HEAD / HTTP/1.1" 200 0 "-" "http.rb/2.2.2 (Mastodon/1.5.0; +https://social.tchncs.de/)"
88.198.21.48 - - [02/Aug/2017:22:37:54 +0000] "GET / HTTP/1.1" 200 7116 "-" "http.rb/2.2.2 (Mastodon/1.4.7; +http://social.troll.academy/)"
2001:41d0:c:ec9::2b43:1d3 - - [02/Aug/2017:22:37:54 +0000] "HEAD / HTTP/1.1" 200 0 "-" "http.rb/2.2.2 (Mastodon/1.5.0; +https://mstdn.io/)"
163.172.185.23 - - [02/Aug/2017:22:37:54 +0000] "HEAD / HTTP/1.1" 200 0 "-" "http.rb/2.2.2 (Mastodon/1.5.0rc3; +https://mastodon.social/)"
163.172.71.138 - - [02/Aug/2017:22:37:54 +0000] "GET / HTTP/1.1" 200 7116 "-" "http.rb/2.2.2 (Mastodon/1.5.0; +https://social.tchncs.de/)"
88.198.21.48 - - [02/Aug/2017:22:37:54 +0000] "GET
// ==UserScript==
// @name Twitter Cramming
// @description Force enable cramming (280 character tweets) on Twitter
// @author Prof. 9
// @version 0.2
// @match https://twitter.com/*
// @run-at document-idle
// @namespace prof9.twittercramming
// ==/UserScript==
#!/usr/bin/env python2
import requests
import mwparserfromhell
import pypandoc
def main():
resp = requests.get("https://events.ccc.de/congress/2017/wiki/index.php?title=Assembly:CSOC&action=raw")
wikicode = mwparserfromhell.parse(resp.text)
@LongHairedHacker
LongHairedHacker / dist_tg.sh
Created December 14, 2017 00:51
Distribution for batman tg table
#!/bin/bash
ssh root@ffnode "batctl tg" | grep -oP "via ([0-9a-f:]*)" | cut -d " " -f 2 | sort | uniq -c | sort -g
@LongHairedHacker
LongHairedHacker / split.py
Last active February 4, 2018 22:21
NOAA APT Splitter PoC
#!/usr/bin/env python3
from PIL import Image
import matplotlib.pyplot as plt
WEDGE_WIDTH = 45
WEDGE_END = 1040
WEDGE_START = WEDGE_END - WEDGE_WIDTH