Skip to content

Instantly share code, notes, and snippets.

View thomd's full-sized avatar

Thomas Dürr thomd

  • Hamburg, Germany
View GitHub Profile
@thomd
thomd / wsp-tools.md
Last active September 15, 2017 13:17
Tools for Testing Web Site Performance
@thomd
thomd / html5-templates.md
Created September 6, 2017 10:14
HTML5 Templates
@thomd
thomd / example-1.js
Last active April 1, 2017 23:20
Pitfalls on Prototypal Inheritance with JavaScript
//
// Circle.prototype = Object.create(Shape.prototype)
// Circle.prototype.constructor = Circle
//
// shape constructor (parent)
var Shape = function(x = 0, y = 0) {
this.x = x
this.y = y
@thomd
thomd / http-server
Created October 4, 2016 19:52
python http server
#!/usr/bin/env python
''' Server non-cached static contents from within current directory
'''
import sys
import signal
import BaseHTTPServer
import SimpleHTTPServer
def trap_sigint():
@thomd
thomd / gulpfile.js
Last active September 12, 2016 19:03
typescript gulp task
var gulp = require("gulp"),
browserify = require("browserify"),
source = require("vinyl-source-stream"),
buffer = require("vinyl-buffer"),
tslint = require("gulp-tslint"),
tsc = require("gulp-typescript"),
sourcemaps = require("gulp-sourcemaps"),
uglify = require("gulp-uglify"),
runSequence = require("run-sequence"),
mocha = require("gulp-mocha"),
@thomd
thomd / cli-services.md
Last active January 17, 2019 16:07
Services for CLIs

Weather

  • curl -4 wttr.in/hamburg

Network

  • curl ipinfo.io
  • curl https://ifconfig.me