Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Klein docteurklein

View GitHub Profile
View README.md
  • why is it that the haskell Text.CSV version is always around twice as slow?
  • how can I use ; as a column separator in the haskell Text.CSV version?
View gist:96ec8b7f126f92069e5a399acc5741cb
root@a77d04db26a6:/go/src/github.com/docker/docker# GOOS=darwin hack/make.sh binary
Removing bundles/
---> Making bundle: binary (in bundles/binary)
Building: bundles/binary-daemon/dockerd-dev
GOOS="darwin" GOARCH="" GOARM=""
# github.com/docker/docker/vendor/github.com/moby/buildkit/snapshot
vendor/github.com/moby/buildkit/snapshot/localmounter_unix.go:17:38: undefined: syscall.MNT_DETACH
# github.com/docker/docker/vendor/github.com/docker/libnetwork/osl
View index.html
<script type="module">
export default class RemoteContent extends HTMLElement {
constructor() {
super();
this.parser = new DOMParser();
this.shadow = this.attachShadow({mode: 'open'});
this.append = this.shadow.appendChild.bind(this.shadow);
this.shadow.innerHTML = 'loading…';
}
View Dockerfile
FROM alpine:edge as build
RUN apk add --no-cache ghc musl-dev
RUN wget https://github.com/commercialhaskell/stack/releases/download/v1.9.0.1/stack-1.9.0.1-linux-x86_64-static.tar.gz -O - \
| tar -Oxzf - stack-1.9.0.1-linux-x86_64-static/stack > /usr/bin/stack
RUN chmod +x /usr/bin/stack
WORKDIR /usr/src/app
@docteurklein
docteurklein / README.md
Last active Oct 19, 2018
generate burndown charts with trello, R and jq
View README.md
export TRELLO_TOKEN='<your trello token>' # found in web cookie
export TRELLO_DONE_ID='<the trello internal id of the "Done" list>'

curl -H "Cookie: token=$TRELLO_TOKEN;" -sL trello.com/b/2NFnHkvl.json \
  | ./plot.sh 2018-06-01 2018-11-01 true | ./burndown.r "$(date --iso -d '+2 year')" && xdg-open burndown.svg
View overhead.php
<?php
$num = floatval($argv[1] ?? '1e6');
echo "iterations: $num\n";
function noop() {
}
$start = microtime(true);
printf("starting raw at:\t\t%.3F s\n", $start);
View test.js
const puppeteer = require('puppeteer');
async function visit(breadcrumb, allowed, denied, visited, browser, url) {
if (visited.has(url)) {
console.log(`already visited ${url}`);
return;
}
if (denied.some(regex => regex.test(url))) {
console.log(`denied ${url}`);
return;
View Dockerfile
FROM alpine:edge
RUN apk add --no-cache docker
ENTRYPOINT ["/usr/sbin/crond", "-f", "-d", "8"]
COPY crontab /crontab
RUN crontab /crontab
View -
  1  9 100%  15 100%  29 31 32 34 100%  43
@docteurklein
docteurklein / README.md
Last active Apr 10, 2016
install a linux hl2:ep2 sourcemod
View README.md

install an hl2:ep2 sourcemod on linux

  1. go to ~/.steam/steam/steamapps/sourcemods
  2. put install.sh and gameinfo.txt in this folder (and config.cfg if you have one)
  3. downldoad a mod archive (example: hl2-ep2-sp-6x10mc-doorville.7z at http://www.runthinkshootlive.com/posts/doorville/)
  4. run ./install.sh hl2-ep2-sp-6x10mc-doorville.7z doorville
  5. restart steam
  6. enjoy