Skip to content

Instantly share code, notes, and snippets.

View YetAnotherMinion's full-sized avatar

yam YetAnotherMinion

View GitHub Profile
@YetAnotherMinion
YetAnotherMinion / main.rs
Created February 19, 2018 01:54
implement Point type for PG
#![feature(custom_attribute)]
#[macro_use]
extern crate diesel;
extern crate byteorder;
use diesel::prelude::*;
use diesel::pg::PgConnection;
//mod points;
module LazyMarkdownBugReproduction exposing (main)
import Array exposing (Array)
import Dict exposing (Dict)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Lazy
import Html.Events exposing (onInput)
import Markdown
@YetAnotherMinion
YetAnotherMinion / kvdb.py
Last active September 13, 2018 19:51
key value db example
#! /usr/bin/env python3
from typing import Dict
from hypothesis import given, assume, reproduce_failure
import hypothesis.strategies as st
import unittest
import logging
class KeyValueStore:
def __init__(self):
self._storage = {}
@YetAnotherMinion
YetAnotherMinion / lib.rs
Last active June 23, 2019 18:10
naive wadler impl
use std::collections::VecDeque;
#[derive(Clone, Debug)]
pub enum Doc {
Nil,
Concat(Box<Doc>, Box<Doc>),
Nest(i32, Box<Doc>),
Text(String),
Line,
Union(Box<Doc>, Box<Doc>),
<html>
<head>
<meta charset="UTF-8">
<title>Hacker News</title>
<style>
#header {
background-color: #ff6600;
height: 25px;
width: 100%;
}