Skip to content

Instantly share code, notes, and snippets.

View mathiasverraes's full-sized avatar

Mathias Verraes mathiasverraes

View GitHub Profile
@mathiasverraes
mathiasverraes / gist:b6673d1a1e010b2db0db46ac11eb80c8
Created April 23, 2018 10:21 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@mathiasverraes
mathiasverraes / jargon.md
Last active April 19, 2018 10:35 — forked from cb372/jargon.md
Category theory jargon cheat sheet

Category theory jargon cheat sheet

A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)

I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.

Functor

A functor is something that supports map.

<?php
final class Basket implements RecordsEvents
{
private $basketCanOnlyContainFiveProducts;
private function __construct()
{
$this->basketCanOnlyContainFiveProducts = new BasketCanOnlyContainFiveProducts();
}
[TestFixture]
public class AuthorizationSpecifications
{
[Test]
public void WhoAreYouGonnaCall()
{
new AuthorizationScenario().
Given(events).
When(command).
InvokedBy(subject/identity).
<?php
// iterator impl:
class MapIterator implements Iterator {
private $f;
private $inner;
public function __construct($f, $inner) {
$this->f = $f;
#!/bin/bash
phpunit
EXIT_CODE="$?"
if [ $EXIT_CODE -eq "255" ]; then
# Wrapping the error code to 1, so bisect marks this build as "bad" and continues.
exit 1
fi
@mathiasverraes
mathiasverraes / promises.md
Created October 22, 2012 18:26 — forked from domenic/promises.md
You're Missing the Point of Promises

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
    // the rest of your code goes here.
});
@mathiasverraes
mathiasverraes / .bashrc
Created November 3, 2011 18:46 — forked from thomasvm/.bashrc
Git shortcuts
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"
@mathiasverraes
mathiasverraes / .bashrc
Created November 3, 2011 18:46 — forked from thomasvm/.bashrc
Git shortcuts
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"