Skip to content

Instantly share code, notes, and snippets.

mnicky /
Created Jan 26, 2019
Result monad for Java (WIP)
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
View gist:00afd9de181123ccd2227e15863fe947

Symmetric Encryption

The only way to encrypt today is authenticated encryption, or "AEAD". ChaCha20-Poly1305 is faster in software than AES-GCM. AES-GCM will be faster than ChaCha20-Poly1305 with AES-NI. Poly1305 is also easier than GCM for library designers to implement safely. AES-GCM is the industry standard.

Use, in order of preference:

  1. The NaCl/libsodium default
mnicky / gist:7e0e21b8dfa07ee9ba57
Created Dec 18, 2015 — forked from grugq/gist:7713916
The text from: On Underground Communications
View gist:7e0e21b8dfa07ee9ba57
Hash: SHA512
Undercover communication
It should be obvious by now, that the only way to communicate
stealthily and securely is to avoid raising suspicion to the
level at which the authorities might consider it worthwhile
to put you under active surveillance (e.g., park a van with
TEMPEST equipment by your apartment).
View gist:df277548d70b50bd141d
"""A simple implementation of a greedy transition-based parser. Released under BSD license."""
from os import path
import os
import sys
from collections import defaultdict
import random
import time
import pickle
SHIFT = 0; RIGHT = 1; LEFT = 2;
mnicky / lux_aeterna.txt
Created Jan 27, 2013
Lux Aeterna - Requiem for a Dream
View lux_aeterna.txt
|G|-2-----2-----2-----2---|-----------------------| x2
mnicky / clojure-blip-videos-orig-urls.txt
Created Dec 14, 2012
Direct links to Clojure videos on Blip TV
View clojure-blip-videos-orig-urls.txt
mnicky / mk.scm
Created Dec 11, 2012 — forked from swannodette/gist:4262177
MiniKanren impl. in Scheme
View mk.scm
#lang r5rs
(define-syntax var
(syntax-rules ()
((_ x) (vector x))))
(define-syntax var?
(syntax-rules ()
((_ x) (vector? x))))
mnicky / interp3.lisp
Created Dec 11, 2012
Scheme interpreter with explicit continuations by Peter Norvig
View interp3.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
;;; Copyright (c) 1991 Peter Norvig
;;; File interp3.lisp: Scheme interpreter with explicit continuations
;;; One bug fix by Cheng Lu Hsu, hsuc@cory.Berkeley.EDU
mnicky / interp2.lisp
Created Dec 11, 2012
Tail-recursive Scheme interpreter by Peter Norvig
View interp2.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
;;; Copyright (c) 1991 Peter Norvig
;;; File interp2.lisp: Tail-recursive Scheme interpreter.
(requires "interp1")
You can’t perform that action at this time.