Skip to content

Instantly share code, notes, and snippets.

View emiflake's full-sized avatar
🌼
Petaline enjoyer

emiflake

🌼
Petaline enjoyer
  • Liqwid Labs
  • Amsterdam, The Netherlands
  • 19:33 (UTC +02:00)
View GitHub Profile
/* ************************************************************************** */
/* */
/* :::::::: */
/* gfx_keys.h :+: :+: */
/* +:+ */
/* By: nmartins <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/04/30 00:56:56 by nmartins #+# #+# */
/* Updated: 2019/05/02 20:28:49 by nmartins ######## odam.nl */
/* */
let mapleader=","
set nocompatible
filetype off
"let base16colorspace=256
set termguicolors
let g:loaded_matchit = 1
// ==UserScript==
// @name Hide Blackhole
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://profile.intra.42.fr/users/*
// @match https://profile.intra.42.fr/
// @grant none
// ==/UserScript==
@emiflake
emiflake / Day05.kt
Last active December 5, 2019 16:30
import java.io.File
import java.util.stream.Stream
import kotlin.streams.toList
import kotlin.system.measureNanoTime
import kotlin.system.measureTimeMillis
sealed class IntCode {
abstract val steps: Int
object Halt : IntCode() {
namespace RFC where
parseDigit = oneOfChars [?0, ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9]
parseHex = Unipar.satisfy isHexDigit "wasn't a hex digit"
parseCRLF = (ch ?\r Unipar.>> ch ?\n)
type RawHeaders
= RawHeaders (Map Text Text)
type Request
= Request HostName Text RawHeaders
@emiflake
emiflake / decoders.u.hs
Created May 13, 2020 17:54
Monadic style JSON decoding with Unison Abilities!
expect! : Either e a -> {Exception e} a
expect! = cases
Left e -> raise e
Right a -> a
identity : Decode Value
identity =
Decode (v -> Right v)
(~>) : Value -> Text -> {Exception Text} Value