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
View Applied-FP-with-Scala.md

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
martijnvermaat / nixos.md
Last active Nov 6, 2019
Installation of NixOS with encrypted root
View nixos.md
@ryancdotorg
ryancdotorg / frag32.py
Created Aug 20, 2015
A FAT32 fragmenter, because I am a horrible person.
View frag32.py
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@rehno-lindeque
rehno-lindeque / NixSetup.md
Last active Jun 2, 2019
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)
View NixSetup.md

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
d6y / space.md
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
vmarcinko / EmbeddedKafkaCluster.java
Created Aug 16, 2014
Embedded Zookeeper & Kafka cluster
View EmbeddedKafkaCluster.java
import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
@yantonov
yantonov / install-ghc-ubuntu.md
Last active Aug 23, 2019
How to install latest GHC from source + latest stack + cabal + cabal-install on ubuntu
View install-ghc-ubuntu.md

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

for your convinience this instuction is available as:
gist
git repo

preferred way install stack than install ghc

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

# settings
@i-e-b
i-e-b / Readme_NIX_OS.md
Last active Aug 7, 2019
/etc/nixos/configuration.nix
View Readme_NIX_OS.md

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
patriknw / LoggingMailbox.scala
Last active Sep 9, 2019
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. <http://www.typesafe.com>
*/
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 akka.actor.{ ActorContext, ActorRef, ActorSystem, ExtendedActorSystem }
You can’t perform that action at this time.