Skip to content

Instantly share code, notes, and snippets.

View bartschuller's full-sized avatar

Bart Schuller bartschuller

View GitHub Profile
@lrytz
lrytz / z-automator.png
Last active October 15, 2024 06:31
Shortcut for Syntax Highlighting in Keynote
@eamelink
eamelink / predicates.scala
Created June 25, 2014 16:06
Composable predicates
class SimpleFile
class ExtendedFile extends SimpleFile
implicit class Predicate[-A](val fn: A => Boolean) {
def &&[B <: A](other: Predicate[B]): Predicate[B] = Predicate { (x: B) =>
fn(x) && other.fn(x)
}
}
@paulp
paulp / brew
Created April 22, 2014 20:17
A unifying wrapper for brew and brew cask.
#!/usr/bin/env bash
#
# A wrapper for brew and brew cask.
#
Brew=/usr/local/bin/brew # hard to avoid hardcoding path if we want to call this "brew"
Cask="$Brew cask"
CaskRegex="^ [-] ([a-z]*):.*"
brewCommands () { $Brew commands | egrep -v commands$ | sort -u; }
@paulp
paulp / test.scala
Created February 1, 2013 17:57
statically typed companion objects
package s
object Test {
// Observe that x.companion is statically typed such that foo is callable
def f1() = {
val x = new Foo
println(x) // Foo instance
println(x.companion) // Foo companion
println(x.companion.foo) // I'm foo!
@mads-hartmann
mads-hartmann / bundles.sh
Created December 7, 2010 16:04
This is how I manage my textmate bundles.
#
# This script will install the following Textmate bundles
#
# Languages
# - c https://github.com/textmate/c.tmbundle
# - coffeescript https://github.com/jashkenas/coffee-script-tmbundle
# - context free https://github.com/textmate/context-free.tmbundle
# - erlang https://github.com/textmate/erlang.tmbundle
# - haskell https://github.com/textmate/haskell.tmbundle.git
# - html https://github.com/textmate/html.tmbundle