Skip to content

Instantly share code, notes, and snippets.

View wiesson's full-sized avatar

Arne Wiese wiesson

View GitHub Profile
import * as React from "react";
class TimeField extends React.Component {
constructor(props) {
super(props);
this.state = {
value: "00:00 am",
isValid: true,
hour: 0,
minute: 0
function *fibonacci(n: number, current: number = 0, next: number = 1) {
if (n === 0) {
return current;
}
yield current;
yield *fibonacci(n-1, next, current + next);
}
@Path("people/{personId}")
private static class PersonResource {
@PathParam("personId")
protected long personId;
@GET
public Person getPerson() {
return null;
}

Keybase proof

I hereby claim:

  • I am wiesson on github.
  • I am wiesson (https://keybase.io/wiesson) on keybase.
  • I have a public key ASB3dBngrq8NoTDPP1gm8yCXtRFjkCgM14ng_jM0ZOqpQAo

To claim this, I am signing this object:

@wiesson
wiesson / AWS Swarm cluster.md
Created August 22, 2017 11:59
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@wiesson
wiesson / AWS Swarm cluster.md
Created August 22, 2017 11:28 — forked from ghoranyi/AWS Swarm cluster.md
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@wiesson
wiesson / .block
Last active June 6, 2017 13:48 — forked from mbostock/.block
Sankey Diagram
border: no
license: gpl-3.0
print({k: chr(k) for k in range(32, 128)})
from django.db.models import ImageField
from django.dispatch import receiver
from django.db import models
class ResponsiveImageField(ImageField):
def __init__(self, verbose_name=None, name=None, width_field=None, height_field=None, **kwargs):
super(ResponsiveImageField, self).__init__(verbose_name, name, width_field, height_field, **kwargs)
def save(self, *args, **kwargs):
from django.contrib import admin
from django.conf import settings
from .models import Location
class LocationAdmin(admin.ModelAdmin):
class Media:
css = {
'all': ('app/css/geocoder.css',)
}
js = (