Skip to content

Instantly share code, notes, and snippets.

View freddyb's full-sized avatar

Frederik B freddyb

View GitHub Profile
@freddyb
freddyb / new-tab.html
Created April 28, 2020 13:52
new tab. shows time.
data:text/html,<style>body,html{height:100%;display:grid;background-color:%2338383d}p{margin:auto;color:white;font-size:48pt;font-family:sans}</style><body><p id=p><script>n=()=>{p.innerText=(new Date()).toLocaleTimeString()};n();setInterval(n,60000);</script>
@freddyb
freddyb / keybase.md
Created September 25, 2017 21:07
I am freddyb on keybase, twitter, github (and more)

Keybase proof

I hereby claim:

  • I am freddyb on github.
  • I am freddyb (https://keybase.io/freddyb) on keybase.
  • I have a public key whose fingerprint is 1331 4246 981D 2C81 F3B2 EEDD 8874 58AD 404E 0968

To claim this, I am signing this object:

@freddyb
freddyb / squeezebox-radio-ssh.md
Last active August 22, 2023 07:37
SqueezeBox Radio Default SSH Passwort

Enhanced TLS Security for non-HTTP protocols

Goal

The goal is to transplant the concepts of HTTP Strict Transport Security (HSTS)[^1] and Public Key Pinning Extension for HTTP[^2] to other protocols that support TLS. We aim to do those for popular internet protocols like SMTP, POP, FTP, XMPP and IRC.

Strategy

  1. Identify status codes that are currently undefined and can be safely ignored by clients that do not support them
  2. In this status code, the server SHOULD send a list of tokens to describe it's Enhanced TLS Security settings. 2.1 foo
@freddyb
freddyb / twitter_gazebo.md
Last active August 29, 2015 14:25
The Twitter Gazebo

The Twitter Gazebo (DRAFT)

################################################################################################################

@freddyb
freddyb / anonabox-is-not-a-magic-bullet.md
Last active August 29, 2015 14:07
My personal notes on Anonabox and anonymity with Tor

The master version of this document has now been moved to my blog

Anonabox is not a magic bullet!

Yesterday, a lot of mainstream media (e.g., WIRED) started reporting about anonabox, an "an open source embedded networking device designed specifically to run Tor.", to quote their Kickstarter campaign.

For those of you who don't know what Tor is: It's a network run by volunteers that anonymizes your internet traffic. With everyone in the network using someone else's address from time to time, it is becoming harder for an observer (e.g. the websites you browse) to find out who is who.

Advertisements & Social Media kill Anonymity

@freddyb
freddyb / gist:7581901
Created November 21, 2013 13:53
join2Async, could be easily expanded to N-size. looked useful but then didn't solve the problem. dumping here so I may use it when in need. hopefully this makes it easier to find: join queue parallel asynchronous synchronous add flush empty enqueue dequeue
/* this queue-style thing accepts a callback
and calls it when it has two results attached
usage:
j2a = new join2Async(console.log);
setTimeout( 'j2a.addResult("foo")', Math.ceil(Math.random()*10));
setTimeout( 'j2a.addResult("var")', Math.ceil(Math.random()*10));
// enjoy the race and see who's first \o/
*/
function join2Async(cb) {
// join 2 async call and return once *both* are done.
@freddyb
freddyb / merge_into_png.py
Created January 23, 2013 10:17
merge a file as a text-chunk into a given png, Usage: merge_into_png.py <file> <png>
#!/usr/bin/env python
"""
Length Chunk type Chunk data CRC
4 bytes 4 bytes Length bytes 4 bytes
89 50 4E 47 0D 0A 1A 0A
@freddyb
freddyb / cidrator.py
Created October 6, 2012 20:58
python iterator that returns IP addresses (as strings) for given ip/cidr string
class cidrator():
def __init__(self, mask ="192.168.1.1/16", skip255=True, skip0=True):
self.skip255 = skip255
self.skip0 = skip0
addr, rng = mask.split("/")
addr_int = sum((256**(3-i) * int(b)) for i,b in enumerate(addr.split (".")))
self.start = addr_int & int("0b"+("1"*int(rng)) + "0"*(32-int(rng)),2)
self.stop = addr_int | int("0b"+("0"*int(rng)) + "1"*(32-int(rng)),2)
self.current = self.start