Skip to content

Instantly share code, notes, and snippets.

View stefan2904's full-sized avatar
🚲
¯\_(ツ)_/¯

Stefan stefan2904

🚲
¯\_(ツ)_/¯
View GitHub Profile
@stefan2904
stefan2904 / .gitignore
Created March 13, 2012 00:16 — forked from flavius/.gitignore
(old) SEP 2012 Toolchain
src
@stefan2904
stefan2904 / .gitignore
Created March 15, 2012 19:54 — forked from flavius/.gitignore
SEP 2012 Toolchain
src
@stefan2904
stefan2904 / gist:7833872
Created December 6, 2013 23:23
the worst program I ever wrote
import sys
# 10 x 20 x 30
# a * b * c = 10 * 20 * 30
# a : b : c = 10 : 20 : 30
# a : b = 10 : 20 => b = a * 20
# a : c = 10 : 30 => c = a * 30
# b : c = 20 : 30 => b = c * 20/30
@stefan2904
stefan2904 / diff.sh
Created March 27, 2014 21:47
Short diff-script for tugraz' computer vision. Install ImageMagick, cd to your cv1x folder, put references in "ref" directory and create empty "diff" directory. run with: sh diff.sh
#!/bin/bash
for FILE in `ls ref`; do
[ -f output/$FILE ] && echo "checking $FILE ..." && convert ref/$FILE output/$FILE -compose difference -composite -negate -contrast-stretch 0 diff/$FILE && convert diff/$FILE -format %c histogram:info:- > diff/$FILE.txt || echo "$FILE does not exist ..."
done
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@stefan2904
stefan2904 / gist:10894963
Created April 16, 2014 15:34
PING im Tunnel
PING google.de (173.194.113.31): 56 data bytes
Bereits im Tunnel:
64 bytes from 173.194.113.31: icmp_seq=0 ttl=54 time=70.003 ms
64 bytes from 173.194.113.31: icmp_seq=1 ttl=54 time=61.783 ms
64 bytes from 173.194.113.31: icmp_seq=2 ttl=54 time=74.258 ms
64 bytes from 173.194.113.31: icmp_seq=3 ttl=54 time=157.233 ms
64 bytes from 173.194.113.31: icmp_seq=4 ttl=54 time=94.450 ms
64 bytes from 173.194.113.31: icmp_seq=5 ttl=54 time=71.677 ms
@stefan2904
stefan2904 / needHelp.md
Last active August 29, 2015 14:00
Bachelorarbeit Mark

("Hilferuf" eines Studienkollegen)

Hi,

Ich brauche für meine Bachelorarbeit bitte deine Hilfe.
Dafür brauchst du ein Android Telefon ab Version 2.3 und ca. 10 - 15 Minuten Zeit.

Worum geht es in meiner Bachelorarbeit?

Ich versuche herauszufinden, wie gut man anhand von Beschleunigungsmessdaten PIN-Codes, die der User z.B. beim Entsperren des Displays, usw. eingibt, erraten kann. Dazu habe ich eine App geschrieben, die die Beschleunigungsmessdaten während der Eingabe in der App protokolliert. Es wird nicht dein echter PIN-Code gespeichert oder erraten! Da es sich um eine wissenschaftliche Arbeit handelt, werden die Daten natürlich nicht für kriminelle/dubiose Zwecke missbraucht! Die Daten werden mit einem Maschine-Learning-Algorithmus ausgewertet.

@stefan2904
stefan2904 / keybase.md
Created May 15, 2014 20:55
keybase.md

Keybase proof

I hereby claim:

  • I am stefan2904 on github.
  • I am 2904 (https://keybase.io/2904) on keybase.
  • I have a public key whose fingerprint is 09D5 5358 F9D3 AFC0 C73D 3F95 EF55 3021 4121 0EA0

To claim this, I am signing this object:

@stefan2904
stefan2904 / backupSessionstore.sh
Created July 30, 2014 19:40
quick & dirty script to backup Firefox's sessionstore (contains open tabs, etc). run @daily via cron for maximum comfort.
#!/bin/sh
SESSIONSTORE="<path to Firefox profile dir>/<profile>.default/sessionstore.js"
TARGET="<some secure/synced location>/sessionstore"
# TODO: add other files here (bookmarks?)
FORMAT=`date +%Y-%m-%d`
cp "${SESSIONSTORE}" "${TARGET}/${FORMAT}_sessionstore.js"
@stefan2904
stefan2904 / v03DecryptionDemo.java
Created September 8, 2014 19:21
JavaPrivacyGuard API v0.3 Demo
public class DecryptPGPMessage {
private static PGPMessage parseMessage(FileInputStream fis) throws Base64Exception, IOException, PGPException {
Base64CRC24InputStream in = new Base64CRC24InputStream(fis);
return new PGPMessage(in);
}
private static PGPPrivateKey parsePrivatekey(FileInputStream fis) throws Base64Exception, IOException, PGPException {
Base64CRC24InputStream in = new Base64CRC24InputStream(fis);