Skip to content

Instantly share code, notes, and snippets.

View filippovitale's full-sized avatar

Filippo Vitale filippovitale

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@filippovitale
filippovitale / sydjs-0.svg
Created August 4, 2012 23:00
Center the Plane
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@filippovitale
filippovitale / keybase.md
Created August 16, 2014 09:47
Keybase proof

Keybase proof

I hereby claim:

  • I am filippovitale on github.
  • I am filippovitale (https://keybase.io/filippovitale) on keybase.
  • I have a public key whose fingerprint is D500 122C 2E12 6B3F E9B7 1577 051C 7654 7F1C 75E1

To claim this, I am signing this object:

Verifying that +filippovitale is my Bitcoin username. You can send me #bitcoin here: https://onename.io/filippovitale
/**
* reference: http://www.cs.ox.ac.uk/ralf.hinze/publications/GGTries/Encode.lhs
*/
object GenTrie {
sealed trait Bit
case object △ extends Bit
case object ▲ extends Bit
type Bits = List[Bit]
@filippovitale
filippovitale / gist:cba86684cc8dace2b854
Created February 10, 2015 09:57
Source code related to the presentation: "Will it blend?" - ScalaSyd Episode 33 - February 2015
import org.scalameter.api._
import scala.collection.mutable
/**
* Source code related to the presentation: "Will it blend?"
* ScalaSyd Episode 33 - February 2015
*/
class BlendBenchmark extends PerformanceTest.OfflineReport {
@filippovitale
filippovitale / xml
Created February 27, 2015 00:29
./Library/LaunchAgents/homebrew.mxcl.kafka.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>SERVER_JVMFLAGS</key>
<string>-Dapple.awt.UIElement=true</string>
import org.specs2._
import scalaz.syntax.id._
/**
* https://github.com/swlaschin/PropertyBasedTesting/blob/master/part2.fsx
*/
class Examples extends Specification with ScalaCheck {
def is = commutative ^ inverse ^ easyToVerify ^ invariant ^ structuralInduction ^ idempotent ^ oracle
/**
  1. General Background and Overview
@filippovitale
filippovitale / FreeConsole
Last active June 4, 2021 06:09
FreeConsole – Simplest end to end example of Coyoneda and Free Monad in Scala
import scalaz.effect.IO
import scalaz.std.function._
import scalaz.{Coyoneda, Free, Monad, State, ~>}
object NonFunctor extends App {
// my simple algebra
sealed trait Console[A]
case class PrintLine(msg: String) extends Console[Unit]
case object ReadLine extends Console[String]