Skip to content

Instantly share code, notes, and snippets.

mnicky mnicky

Block or report user

Report or block mnicky

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
@mnicky
mnicky / Result.java
Created Jan 26, 2019
Result monad for Java (WIP)
View Result.java
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
mnicky / gist:7e0e21b8dfa07ee9ba57
Created Dec 18, 2015 — forked from grugq/gist:7713916
The text from: http://dee.su/uploads/baal.html On Underground Communications
View gist:7e0e21b8dfa07ee9ba57
-----BEGIN PGP SIGNED MESSAGE-----
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 mvnc.sh
#!/bin/bash
RESET="\e[0m"
BLACK="\e[0;30m"
RED="\e[0;31m"
GREEN="\e[0;32m"
YELLOW="\e[0;33m"
BLUE="\e[0;34m"
MAGENTA="\e[0;35m"
CYAN="\e[0;36m"
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
mnicky / lux_aeterna.txt
Created Jan 27, 2013
Lux Aeterna - Requiem for a Dream
View lux_aeterna.txt
Intro
|E|-----------------------|-----------------------|
|B|-----------------------|-----------------------|
|G|-2-----2-----2-----2---|-----------------------| x2
|D|-----------------------|-3-----3-----2-----2---|
|A|-0-----0-----0-----0---|-----------------------|
|E|-----------------------|-1-----1-----0-----0---|
@mnicky
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
http://blip.tv/file/get/Richhickey-ClojureDataStructuresPart1411.flv
http://blip.tv/file/get/Richhickey-ClojureDataStructuresPart2306.flv
http://blip.tv/file/get/Richhickey-ClojureSequences733.flv
http://blip.tv/file/get/Richhickey-ClojureConcurrency252.flv
http://blip.tv/file/get/Richhickey-ClojureForJavaProgrammers2Of2680.mov
http://blip.tv/file/get/Richhickey-ClojureForJavaProgrammers1Of2174.flv
http://blip.tv/file/get/Richhickey-ClojureForLispProgrammersPart2299.mov
http://blip.tv/file/get/Richhickey-ClojureForLispProgrammersPart1372.flv
http://blip.tv/file/get/Richhickey-HammockdrivenDevelopment465.mov
http://blip.tv/file/get/Richhickey-MichaelFogusFertileGroundTheRootsOfClojure492.mov
@mnicky
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
mnicky / interp3.lisp
Created Dec 11, 2012
Scheme interpreter with explicit continuations by Peter Norvig
View interp3.lisp
;source: http://norvig.com/paip/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
mnicky / interp2.lisp
Created Dec 11, 2012
Tail-recursive Scheme interpreter by Peter Norvig
View interp2.lisp
;source: http://norvig.com/paip/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.