Skip to content

Instantly share code, notes, and snippets.

Paul Kinsky pkinsky

Block or report user

Report or block pkinsky

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

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
martijnvermaat /
Last active Jan 19, 2020
Installation of NixOS with encrypted root
ryancdotorg /
Created Aug 20, 2015
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from
def ppNum(num):
return "%s (%s)" % (hex(num), num)
rehno-lindeque /
Last active Jun 2, 2019
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)

Setup NixOS (Virtualized + Haskell + Gnome3 + XMonad)

Before you get started

This is pretty out of date now... you may want to look elsewhere

Newer guides than mine (mine is a bit dated and has a lot of rough edges):

Have you looked at these?

d6y /
Last active Nov 16, 2016
Spacemacs: Notes made during install
View LensStates.scala
object Test {
import scalaz.{Lens,State}
case class BlahConfig(server: Int, l: List[Int])
def doStuff(i: Int) = State[BlahConfig,Int]( c => (c.copy(l = i :: c.l), c.server) )
case class FooConfig(val password: String)
def doSomeStuff(i: Int) = State[FooConfig, String](c =>(c, c.password))
vmarcinko /
Created Aug 16, 2014
Embedded Zookeeper & Kafka cluster
import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
yantonov /
Last active Aug 23, 2019
How to install latest GHC from source + latest stack + cabal + cabal-install on ubuntu

How to install GHC from source + latest stack + cabal + cabal-install on ubuntu

for your convinience this instuction is available as:
git repo

preferred way install stack than install ghc

stack (package manager and build tool, preferrered way to manage dependencies)

# settings
i-e-b /
Last active Aug 7, 2019

My experiments with an XMonad setup in NixOS. This is my work box now, so it pretty much works.

probably needs:

# useradd -m iain
# passwd iain ...
# passwd root ...
patriknw / LoggingMailbox.scala
Last active Jan 7, 2020
Logs the mailbox size when exceeding the configured limit. Implemented in Scala and Java. Copy one of them to your project and define the configuration. This code is licensed under the Apache 2 license.
View LoggingMailbox.scala
* Copyright (C) 2009-2014 Typesafe Inc. <>
package akka.contrib.mailbox
import scala.concurrent.duration._
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicLong
import com.typesafe.config.Config
import{ ActorContext, ActorRef, ActorSystem, ExtendedActorSystem }
You can’t perform that action at this time.