Skip to content

Instantly share code, notes, and snippets.

@jwreagor
jwreagor / EmacsKeyBinding.dict
Created March 20, 2014 18:41
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
module Printf
%default total
data Format = FInt Format -- %d
| FString Format -- %s
| FOther Char Format -- [a-zA-Z0-9]
| FEnd --
format : List Char -> Format
@sjoerdvisscher
sjoerdvisscher / shape-from-rep.hs
Last active May 3, 2018 00:12
Shape from Rep
{-# LANGUAGE DeriveGeneric, DataKinds, TypeOperators, TypeFamilies, PolyKinds, UndecidableInstances #-}
import GHC.Generics
data Foo
= A Int Bool String
| B
| C Double Int
deriving Generic
type family (l :: [k]) ++ (r :: [k]) :: [k]
@rwbarton
rwbarton / A.hs
Last active February 2, 2017 09:32 — forked from 23Skidoo/A.hs
-- Code taken from http://stackoverflow.com/questions/12735274/breaking-data-set-integrity-without-generalizednewtypederiving/12744568#12744568
-- Discussion on haskell-cafe: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/100870
-- http://www.haskell.org/pipermail/haskell-cafe/2012-October/103984.html
-- Modified to remove orphan instances by rwbarton
module A where
data U = X | Y deriving (Eq, Ord, Show)
data T u b c = T u b c deriving (Eq, Show)
@mzero
mzero / info.md
Created July 20, 2014 17:33
Root cause of haddock / clang failure

Root cause of haddock / clang failure

Consider this simple .hs file:

module MinHaddockFail where

yo :: String
yo = "yo"
@grugq
grugq / gist:03167bed45e774551155
Last active January 10, 2026 02:28
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@glaebhoerl
glaebhoerl / A.hs
Last active July 4, 2017 23:56 — forked from rwbarton/A.hs
-- Code taken from http://stackoverflow.com/questions/12735274/breaking-data-set-integrity-without-generalizednewtypederiving/12744568#12744568
-- Discussion on haskell-cafe: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/100870
-- http://www.haskell.org/pipermail/haskell-cafe/2012-October/103984.html
-- Modified to remove orphan instances by rwbarton
-- Simplified by glaebhoerl
module A (A(..), Set, empty, insert, on) where
import Data.Set
import Data.Function
ERLYVIDEO-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Gauge32, enterprises FROM SNMPv2-SMI
OBJECT-GROUP FROM SNMPv2-CONF
DisplayString FROM SNMPv2-TC;
erlyvideo MODULE-IDENTITY
@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active November 27, 2021 13:07
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@yminsky
yminsky / gist:1645d897bc9128ed4450
Created December 5, 2015 17:05
Lyrics for OCaml/Async rap
Lyrics:
Take big steps to eval, like a nomad
Bind and return like a Monad
Got you looking so mad
about the signature I got you using
in the directory with the MLI files the compiler was choosing
The type checks out, I’m feeling greater
Defer the value now and I return a little later
Cuz I’m threaded, so for now I ain’t got much to say