Skip to content

Instantly share code, notes, and snippets.


Maciej Łebkowski mlebkowski

View GitHub Profile
Avaq / combinators.js
Last active Dec 1, 2020
Common combinators in JavaScript
View combinators.js
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
robotlolita /
Last active Jul 6, 2020
Why `xs.each(f)` should not be considered a "loop".

First and foremost, let's take a look at the following pieces of code. The first one is something you should be rather familiar with, and the second one is also a somewhat familiar idiom these days (at least in languages with higher-order functions):

// Example 1:
30 + 12

// Example 2:
rtomayko /
Last active Nov 15, 2018
Simple shell command language test library.
# Usage: .
# Simple shell command language test library.
# Tests must follow the basic form:
# begin_test "the thing"
# (
# set -e
# echo "hello"
mlebkowski / build.xml
Created Sep 10, 2012
Default Ant File
View build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="Your Project Name" default="build">
<target name="build" depends="prepare,phpunit" />
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/api" />
<delete dir="${basedir}/build/code-browser" />
<delete dir="${basedir}/build/coverage" />
<delete dir="${basedir}/build/logs" />
bjhess /
Created May 18, 2012
The way I had to add a github repo webhook for pull requests

This is more complex than necessary.

GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.

  "name": "web",
  "active": true,
ziadoz /
Last active Nov 29, 2020
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
You can’t perform that action at this time.