Skip to content

Instantly share code, notes, and snippets.


Niklas Keller kelunik

View GitHub Profile
View MethodNotAllowedExceptionDemo
use Arya\Request;
use Arya\Response;
View ea.Client.json
"methods": [
"name": "run",
"returnComment": "",
"params": [],
"comment": "Die run-Methode des Threads baut eine Verbindung zum Server aus.\n Sobald dieser Thread erfolgreich abgeschlossen ist, kann die Verbindung\n zur Kommunikation genutzt werden.",
"type": "void",
"modifiers": "public"
View github-conversations.user.js
// ==UserScript==
// @name GitHub Conversations
// @namespace
// @version 0.4
// @description Provides a next button to jump between conversations in large diffs on GitHub.
// @author Niklas Keller
// @match*/*/commit/*
// @grant none
// ==/UserScript==
kelunik / Dockerfile
Last active Aug 29, 2015
Docker PHP 7
View Dockerfile
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y wget
RUN apt-get install -y unzip
RUN apt-get install -y gcc
RUN apt-get install -y make
RUN apt-get install -y autoconf
RUN apt-get install -y bison
View travis-ip-ranges.txt
The IP addresses depend on what environment they run in.
For jobs running on the container-based infrastructure, the range is for .com and for .org.
For jobs running on the legacy Linux infrastructure, the ranges are, and These are the ranges of our infrastructure provider, so they may also include hosts that do not belong to Travis CI.
For jobs running on our Mac infrastructure, the ranges are (this range also belongs to our infrastructure provider and may contain non-Travis CI hosts) and
Please do note that these ranges can change in the future.
kelunik /
Last active Mar 10, 2016
X1C Install
# re-run as root if necessary
if [[ $EUID -ne 0 ]]; then
sudo ./$0
# apt-get install -y acpi


The goal of this specification is to define an Awaitable interface for interoperability in PHP.

An Awaitable represents the eventual result of an asynchronous operation. The primary way of interacting with an Awaitable is through its when method, which registers a callback to receive either an Awaitable's eventual value or the reason why the Awaitable has failed. They're basically the same as a Promise in JavaScript's Promises/A+ specification, but the interaction with them is different as the following paragraphs show.

This specification defines an interoperable Awaitable interface for PHP, focussing on its when method. This is required for interoperable co-routines, which can be implemented in PHP using generators. Further methods like a watch method for progress updates are out of scope of this specification. The name Awaitable works well if PHP is extended later to support await and is also alraedy [used in HHVM](htt

kelunik /
Created Aug 14, 2016
Documentation Management System

I plan to write a new documentation system, because I couldn't find any system that suites my / our needs at amphp. It has to support multiple packages and their various versions (at least major.minor, bugfix versions will just update the current version). Furthermore, there needs to be support for tutorial series. It's planned to build these from markdown files in ./doc currently.

But we can write as much documentation as we like, the key point is that it must be usable for those that really need the documentation to learn how things work. So I'm asking you here. As a new user of a framework / library / package, what's your preference?

  • What do you need in a documentation system?
  • What is your preferred way for navigation?
  • What should tutorial series look like?

And two more questions if you want to publish your own documentation:

View github-default-issue-list.userscript.js
// ==UserScript==
// @name GitHub Default Issue List
// @namespace
// @version 0.1
// @description GitHub Default Issue List
// @author Niklas Keller <>
// @match*
// @grant none
// ==/UserScript==
kelunik /
Last active Nov 14, 2016
PHP Parameter Variance