Skip to content

Instantly share code, notes, and snippets.

View swynter-ladbrokes's full-sized avatar

Shannon Wynter swynter-ladbrokes

View GitHub Profile
@swynter-ladbrokes
swynter-ladbrokes / Output
Last active August 29, 2015 14:19
Cross namespace tick handler doesn't work as I'd hope...
#php main.php
Registering tick function as Tick\Thing::tick()
* Tick
* Tick
Do something
Do something else
@swynter-ladbrokes
swynter-ladbrokes / etcdctl
Last active February 7, 2022 16:14
Basic bash completion for etcdctl
#!bash
_etcdctl_list() {
local IFS=$'\n'
local wd="$cur"
local -a tokens
if ! etcdctl ls "$wd" &> /dev/null; then
wd=$(dirname "$wd")
fi
<?php
class Benchmark {
private $task_duration = 5;
private $tasks = [];
private $results = [];
private $duation = 0;
public function __construct() {