Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy Bornstein unprolix

View GitHub Profile
View gist:29369ad5e91fa28dfa85
float th1, th2, r1 = 110, r2 = 100;
float d;
float x, y, t;
int N = 66;
float s = .0015;
int nf = 320;
float tt;
void setup() {
size(500, 500, P2D);
@kyledrake
kyledrake / ferengi-plan.txt
Last active Jul 12, 2021
How to throttle the FCC to dial up modem speeds on your website using Nginx
View ferengi-plan.txt
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@UniIsland
UniIsland / list-manually-installed-packages.sh
Created Feb 8, 2014
List all manually installed packages on a debian/ubuntu system
View list-manually-installed-packages.sh
#!/bin/bash
## List all manually installed packages on a debian/ubuntu system
## manually installed means:
## 1. not pre-installed with the system
## 2. not marked auto-installed by apt (not dependencies of other
## packages)
## Note: pre-installed packages that got updated still needs to be
## filtered out.
@karlgluck
karlgluck / Hash Ladders for Shorter Lamport Signatures.md
Last active Nov 11, 2021
I describe a method for making Lamport signatures take up less space. I haven't seen anyone use hash chains this way before, so I think it's pretty cool.
View Hash Ladders for Shorter Lamport Signatures.md

What's this all about?

Digital cryptography! This is a subject I've been interested in since taking a class with Prof. Fred Schneider back in college. Articles pop up on Hacker News fairly often that pique my interest and this technique is the result of one of them.

Specifically, this is about Lamport signatures. There are many signature algorithms (ECDSA and RSA are the most commonly used) but Lamport signatures are unique because they are formed using a hash function. Many cryptographers believe that this makes them resistant to attacks made possible by quantum computers.

How does a Lamport Signature work?

@railwaycat
railwaycat / Emacs_starter.pl
Last active Sep 8, 2021
Start Emacs.app from CLI
View Emacs_starter.pl
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
@nbogie
nbogie / SimpleAesonJsonExample.hs
Created May 22, 2011
Simplest Aeson json parsing and generation example
View SimpleAesonJsonExample.hs
{-# LANGUAGE OverloadedStrings #-}
-- This is a very simple example of parsing and generating json with Aeson,
-- by a haskell newbie and intended for newbies.
--
-- This almost certainly contains a number of bad practices. It works for
-- me and hopefully will get you started.
--
-- I couldn't find a stand-alone example of Aeson usage and found it tricky to
-- get going. For example, if you don't realize to enable the language extension