Skip to content

Instantly share code, notes, and snippets.

alexhornbake / headers-timeout-keep-alive.js
Created Aug 20, 2020
reproduce nodejs keep-alive bug
View headers-timeout-keep-alive.js
// Client that can reproduce
// modified from
const http = require("http");
const net = require("net");
function startClient(port) {
const socket = net.createConnection({ port });
let responseCount = 0;
socket.on("data", (chunk) => {
alexhornbake /
Last active Jun 10, 2019
Golang 2 proposal. Refuse. A conditional return keyword.

refuse - a mini-proposal for conditional returns. This is an alternative proposal for try, check, check/handle.

So we want to simplify things like:

1: err, thing := newThing(name)
2: if err != nil {
3: 	return nil, err
4: }
View index.html
<!DOCTYPE html>
body {
margin: 0;
height: 100%;
overflow: hidden
alexhornbake / index.html
Last active Sep 24, 2017
push pop mechanic
View index.html
<!DOCTYPE html>
.tile {
width: 4%;
padding-bottom: 4%;
display: inline-block;
margin: 5px;

Keybase proof

I hereby claim:

  • I am alexhornbake on github.
  • I am alexhornbake ( on keybase.
  • I have a public key whose fingerprint is D462 175C 4B29 C55E 86E9 001F 49A4 3C6B BF6D 240D

To claim this, I am signing this object:

alexhornbake / gist:4277348f8b3ab5f7a917
Created Apr 21, 2014
fetch m3u8... follow redirect and fetch segments from akamai
View gist:4277348f8b3ab5f7a917
masterM3u8=$(curl -L "$m3u8Url" | grep -m1 http)
token=$(echo \""$m3u8Url" | grep -o hdnea.*)
echo $token
echo "fetching... ""$masterM3u8""&""$token"
segments=$(curl -c cookies.txt "$masterM3u8""&""$token" | grep http)
while read -r line; do
alexhornbake / index.html
Last active Jun 5, 2022
Generate Path for Curly Bracket
View index.html
<title>Curly Bracket</title>
<script src="" charset="utf-8"></script>
.curlyBrace {
stroke: #000000;
stroke-width: 10px;
alexhornbake /
Last active Dec 19, 2015
Mapping Facebook Friend Locations and Connections
# Script to strip longitude and latitude data from friend list and coorelate with mutual friends
# Intentionally remove any identifying info before writing to file.
# Author: achornbake , 7/13/2013
# Facebook Data exported using "Give me my Data App" by Ownen Mundy
import sys
import json
from pprint import pprint
alexhornbake / chapter7.js
Last active Dec 19, 2015
Shortest Route Hiva 'Oa Map
View chapter7.js
// Visualization of the Hiva 'Oa map in chapter 7 of
// 'Eloquent Javascript' by Marijn Haverbeke
// see original example at
// for more detail on everything below noted as "Original example from text" in chapter7.js
var roads = {};
function makeRoad(from, to, length)