Skip to content

Instantly share code, notes, and snippets.

View manpages's full-sized avatar

Jonn Mostovoy manpages

View GitHub Profile
@manpages
manpages / kci.txt
Last active July 1, 2018 23:01
KCI Rules
601.2g. If the total cost includes a mana payment, the player then has a
chance to activate mana abilities (see rule 605, "Mana Abilities"). Mana
abilities must be activated before costs are paid.
601.2h. The player pays the total cost in any order. Partial payments
are not allowed. Unpayable costs can't be paid.
605.3. Activating an activated mana ability follows the rules for
activating any other activated ability (see rule 602.2), with the
following exceptions:
@manpages
manpages / Merkle.bib
Created March 7, 2018 00:01
LHS even the tiny things during R&D!
@online{certitrans,
author = "Certificate Transparency Team",
title = "How Log Proofs Work",
url = "https://www.certificate-transparency.org/log-proofs-work",
keywords = "security,authenticated data structures,tls"
}
@paper{algorand,
author = "Silvio Micali",
title = "ALGORAND The Efficient Public Ledger",
keywords = "cryptocurrency,non-pow,decentralized,distributed",
resolver: lts-3.19
packages:
- '.'
- scotty-hastache
extra-deps: []
flags: {}
@manpages
manpages / solution.md
Last active December 13, 2015 22:08
The ultimate solution to ling run-bys in macro PvZ
..........GG......
..........GG......
......NNNNPGG.....
......NNNNCGG.....
......NNNNCGG.....
......NNNNPGG.....
..........GG......
..........GG......
@manpages
manpages / .ghci
Last active December 3, 2015 11:41
Slides in your GHCi
import qualified System.IO.Strict as StrictIO
import qualified System.Directory as Dir
import qualified Data.Text as T
:set +m
:set prompt "\ESC[1;34m%s\n\ESC[0;34mλ> \ESC[m"
:set -XNoMonomorphismRestriction
:set -XRankNTypes
:set -XOverloadedStrings
@manpages
manpages / shell.nix
Created November 19, 2015 15:18
shellHook to the rescue
{ nixpkgs ? (import <nixpkgs> {}) }:
nixpkgs.stdenv.mkDerivation {
name = "aliester-shell";
buildInputs = [];
shellHook =
''
export ANYTHING=666
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
@manpages
manpages / Nix-logo.render
Created November 16, 2015 16:38
Render of ASCII art Nix logo
---. ,-----, --,
/\\\\\ \OOO0\ /OO0\
\/\\\\\ \OOO0\ /OOOO\
\/\\\\\ \OOO0\ /OOOO/
\/\\\\\ \OOO0\/OOOO/
-------\/\\\\\--------- \OOOOOOOO/
///////////////////////\\ \OOOOOO/
/\\\\\\\\\\\\\\\\\\\\\\\\\\ \OOOO0\
**************************** \00000\
@manpages
manpages / wtf-am-i-blind.purs
Created August 22, 2015 22:51
Doesn't compile with type mismatch
data AttrNS = AttrNS { localName :: String
, value :: String
, legacyName :: String
, namespaceURI :: Nullable String
, prefix :: Nullable String
, legacySpecified :: Boolean }
--
toAttrNS :: forall r. { localName :: String
, value :: String
, namespaceURI :: Nullable String
@manpages
manpages / fmapNullable.purs
Created August 22, 2015 22:24
Nullable is clearly at least a functor
fmapNullable :: forall a b. (a -> b) -> (Nullable a) -> (Nullable b)
fmapNullable f x = g f $ toMaybe x
where
g f Nothing = toNullable Nothing
g f (Just v) = toNullable $ Just (f v)
d <- doc'
b <- body'
img <- ND.createElement "img" d
b1 <- N.appendChild (e2n img) (e2n b)