Skip to content

Instantly share code, notes, and snippets.

Mathias Verraes mathiasverraes

Block or report user

Report or block mathiasverraes

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
@mathiasverraes
mathiasverraes / gist:b6673d1a1e010b2db0db46ac11eb80c8
Created Apr 23, 2018 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations
View gist:b6673d1a1e010b2db0db46ac11eb80c8

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 Apr 19, 2018 — forked from cb372/jargon.md
Category theory jargon cheat sheet
View jargon.md

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.

View Basket.php
<?php
final class Basket implements RecordsEvents
{
private $basketCanOnlyContainFiveProducts;
private function __construct()
{
$this->basketCanOnlyContainFiveProducts = new BasketCanOnlyContainFiveProducts();
}
View Authorization.cs
[TestFixture]
public class AuthorizationSpecifications
{
[Test]
public void WhoAreYouGonnaCall()
{
new AuthorizationScenario().
Given(events).
When(command).
InvokedBy(subject/identity).
View iterator-vs-generator.php
<?php
// iterator impl:
class MapIterator implements Iterator {
private $f;
private $inner;
public function __construct($f, $inner) {
$this->f = $f;
View git-bisect-phpunit.sh
#!/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 Oct 22, 2012 — forked from domenic/promises.md
You're Missing the Point of Promises
View promises.md

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 Nov 3, 2011 — forked from thomasvm/.bashrc
Git shortcuts
View .bashrc
#! /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 Nov 3, 2011 — forked from thomasvm/.bashrc
Git shortcuts
View .bashrc
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"
You can’t perform that action at this time.