Skip to content

Instantly share code, notes, and snippets.

💾
don't copy that floppy

Jimmy Zelinskie jzelinskie

💾
don't copy that floppy
Block or report user

Report or block jzelinskie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jzelinskie
jzelinskie / config
Last active Oct 22, 2019
generate a knot-resolver (kresd) blacklist.rpz from pihole sources
View config
-- Refer to manual: https://knot-resolver.readthedocs.io/en/latest/daemon.html#configuration
-- Listen on all interfaces (localhost would not work in Docker)
net.listen('0.0.0.0')
net.listen('0.0.0.0', 853, {tls=true})
-- Auto-maintain root TA
trust_anchors.file = '/data/root.keys'
-- Load Useful modules
@jzelinskie
jzelinskie / main.go
Created Jun 4, 2017
mario kart64 rng in Go
View main.go
package main
import "fmt"
func SuperMario64RNG(input uint16) uint16 {
if input == 0x560A {
input = 0
}
var s0 uint16 = uint16(uint8(input) << 8)
s0 = s0 ^ input
@jzelinskie
jzelinskie / email.txt
Created Nov 29, 2016
Alpine-SecDB License
View email.txt
Delivered-To: jimmy.zelinskie@coreos.com
Received: by 10.237.52.230 with SMTP id x93csp1047052qtd;
Mon, 14 Nov 2016 12:13:31 -0800 (PST)
X-Received: by 10.200.56.253 with SMTP id g58mr8090851qtc.201.1479154411609;
Mon, 14 Nov 2016 12:13:31 -0800 (PST)
Return-Path: <ncopa@alpinelinux.org>
Received: from newmail.tetrasec.net (mail.tetrasec.net. [74.117.189.117])
by mx.google.com with ESMTP id s23si16209759qka.36.2016.11.14.12.13.31;
Mon, 14 Nov 2016 12:13:31 -0800 (PST)
Received-SPF: neutral (google.com: 74.117.189.117 is neither permitted nor denied by best guess record for domain of ncopa@alpinelinux.org) client-ip=74.117.189.117;
@jzelinskie
jzelinskie / client.go
Last active Nov 9, 2019
grpc bidirectional streams in golang
View client.go
package main
import (
"log"
"time"
"golang.org/x/net/context"
"google.golang.org/grpc"
pb "github.com/jzelinskie/grpc/simple"
@jzelinskie
jzelinskie / Dockerfile
Created Jun 29, 2015
example Quay.io cache buster
View Dockerfile
# vim:ft=dockerfile
FROM phusion/baseimage:latest
# Install the dependencies.
# Change the comment on the line below to bust the cache and refresh the apt-cache.
RUN apt-get update # 24JUN2015
View keybase.md

Keybase proof

I hereby claim:

  • I am jzelinskie on github.
  • I am jzelinskie (https://keybase.io/jzelinskie) on keybase.
  • I have a public key whose fingerprint is 306E 99CB 7069 D6B1 8943 B14F AB71 936A 73BD 25F1

To claim this, I am signing this object:

@jzelinskie
jzelinskie / main.go
Last active Aug 29, 2015
print an infohash
View main.go
package main
import (
"crypto/sha1"
"fmt"
"io/ioutil"
"log"
"net/url"
"github.com/chihaya/bencode"
@jzelinskie
jzelinskie / reservoir_sampling.py
Last active Jan 2, 2016
Select a random element from a stream with uniform probability (we only have access to the current element, and a function to get the next element which returns EOF when at the end of the stream).
View reservoir_sampling.py
import random
def uniform_random_from_stream(stream):
""" Returns a random number from an enumerable with uniform probability
by using a "reservoir sampling" algorithm """
reservoir = []
sample_count = 1
for index, item in enumerate(stream):
if index < sample_count:
View ocaml_gotchas.md

a list of OCaml complexities extracted from Real World OCaml

arrays are by default mutable (and the syntax is crazy)

let array = [| "this";"is";"a";"array"; |];;
(* val array : string array = [|"this"; "is"; "a"; "array"|] *)

(** accessing a value *)
array.(2);;
View erl_notes.md

a list of fundamentals of Erlang extracted from LYSE.

shell

commands

  • help().
  • ctrl+g --> h

compilation

You can’t perform that action at this time.