Skip to content

Instantly share code, notes, and snippets.

@gseitz
gseitz / trolling_haskell
Created April 8, 2016 10:01 — forked from quchen/trolling_haskell
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@gseitz
gseitz / keybase.md
Created September 25, 2014 23:25
keybase.md

Keybase proof

I hereby claim:

  • I am gseitz on github.
  • I am gseitz (https://keybase.io/gseitz) on keybase.
  • I have a public key whose fingerprint is A3B3 C992 3BDB D9F9 F215 79D5 AE2A 708C 9159 6EA1

To claim this, I am signing this object:

@gseitz
gseitz / gist:bf450650a343f1b093c9
Created June 4, 2014 08:42
"The Way to Learn FP" - Tony Morris
[09:52] < t4nk061> any reason to start with haskell as I noticed it appears
clearer to get the FP concepts and then get into scala?
[09:52] < dibblego> definitely start with haskell
[09:52] < dibblego> the NICTA course material has a google hangout each week
[09:52] < dibblego> we just finished today's
[09:52] < dibblego> each Wednesday UTC 0200
[09:52] < dibblego> there is huge peer support here
[09:52] < dibblego> #nicta-course #bfpg
[09:53] < dibblego> everyone in this channel uses haskell and can help you
[09:53] < dibblego> http://github.com/nicta/course
@gseitz
gseitz / .vimrc
Last active August 29, 2015 14:01
set nocompatible " be iMproved
filetype off " required!
if has('vim_starting')
set nocompatible " Be iMproved
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
@gseitz
gseitz / CanBuildFrom.hs
Last active November 16, 2015 07:03
CanBuildFrom.hs
{-# LANGUAGE MultiParamTypeClasses #-}
{-#LANGUAGE FlexibleInstances #-}
module CanBuildFrom where
import Data.Foldable
import Data.Map
data Builder from elem to = Builder {
result :: to,
add :: elem -> Builder from elem to
@gseitz
gseitz / gist:9082894
Created February 18, 2014 23:37 — forked from paulp/gist:9081797
scala> val buf = ListBuffer(1)
buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1)
scala> val xs = buf.toIterable match { case xs: List[Int] => xs }
xs: List[Int] = List(1)
scala> buf ++= 1 to 100
res11: buf.type = ListBuffer(1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100)
scala> xs
@gseitz
gseitz / GenLens.scala
Created February 6, 2014 08:29
Automatically derive a Traverse instance for "Generic Lenses"
scala> :paste
// Entering paste mode (ctrl-D to finish)
trait GenLens[T[_]] {
def get[B](a: T[B]): B
def set[A, B](a: T[A], b: B): T[B]
}
implicit def lensTraversable[T[_]](implicit l: GenLens[T]): Traverse[T] = new Traverse[T] {
def traverseImpl[G[_], A, B](fa: T[A])(f: (A) => G[B])(implicit G: Applicative[G]) = {
@gseitz
gseitz / Minified.scala
Created October 14, 2013 15:06
AbstractMethodError at runtime
package com.leonteq.datahubconnector.util
object FooImpl extends GoodBar[Int]
object BadFooImpl extends BadFoo with BadBar[Int]
trait BadFoo {
this: BadBar[_] =>
def mapBazes = bazes.map(identity)
// ==UserScript==
// @author Gerolf Seitz
// @name Github Wide Diff.
// @description Make the diff view as wide as the browser window.
// @include https://github.com/*
// ==/UserScript==
(function () {
function addJQuery(callback) {
@gseitz
gseitz / DependencyGraphHelper.scala
Created August 26, 2013 15:37
sbt-dependency-graph helper
import sbt._
import java.awt.Desktop
object DependencyGraphHelper extends Plugin {
val openDepTree = TaskKey[Unit]("open-deptree")
override def projectSettings = Seq(
openDepTree in Compile <<= openDependencyTreeFor(Compile),
openDepTree in Runtime <<= openDependencyTreeFor(Runtime),