Skip to content

Instantly share code, notes, and snippets.

import time
import sys
consolewidth=80
def delay_print(s):
for c in s:
sys.stdout.write( '%s' % c )
sys.stdout.flush()
time.sleep(float(1)/float(60))

Keybase proof

I hereby claim:

  • I am sundhaug92 on github.
  • I am sundhaug92 (https://keybase.io/sundhaug92) on keybase.
  • I have a public key whose fingerprint is E00D C8AF 7986 05DB F73E 4C05 FDF0 3A6F 7279 B9AA

To claim this, I am signing this object:

@sundhaug92
sundhaug92 / fuzzer2.py
Created September 14, 2016 19:37
GDB remote socket fuzzer
import random,gdb
g=gdb.gdb()
def f(i):
if i==0:
for c in range(32,127):
yield chr(c)
else:
yield from f(i-1)
@sundhaug92
sundhaug92 / proof.py
Created July 21, 2017 21:43
Proof that, for any set, it's either true that all elements are equal or that atleast one element has a higher value than the average
'''
Proof that, for any set, it's either true that all elements are equal or that atleast one element has a higher value than the average
'''
def avg(a):
'''
Calculate average over a set, list, array or similar
'''
return sum(a)/len(a)
def f(a):
@sundhaug92
sundhaug92 / openpgp.txt
Created August 30, 2017 05:43
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:e00dc8af798605dbf73e4c05fdf03a6f7279b9aa]
@sundhaug92
sundhaug92 / pow.py
Created September 22, 2017 14:33
Proof of work implementation for Python3
from hashlib import sha512
def count_noughts(s):
n=0
for c in s:
if c == '0':n+=1
else:
return n
return 0