Skip to content

Instantly share code, notes, and snippets.

View wiesson's full-sized avatar

Arne Wiese wiesson

View GitHub Profile
@wiesson
wiesson / xmas.py
Last active December 27, 2022 02:24
Aufgabe: Zahl1 - Zahl2 = 42137. Zahl1 und Zahl2 werden aus 1, 2, 3, 4, 5, 6, 7, 8 oder 9 gebildet, jede Zahl kommt nur einmal vor.
"""
Lsg:
43726 - 1589 = 42137
43789 - 1652 = 42137
47326 - 5189 = 42137
47398 - 5261 = 42137
"""
from random import shuffle
while True:
@wiesson
wiesson / index.php
Created November 27, 2015 15:08
Click 2 Call - XML RPC Example with PHP
<?php
if (!extension_loaded('xmlrpc')) {
echo "PHP xmlrpc extension is not available.";
die;
}
function call($remoteUri, $localUri, $username, $password)
{
$requestParameter = array(
'RemoteUri' => sprintf('sip:%s@sipgate.de', $remoteUri),
@wiesson
wiesson / pool.py
Last active January 4, 2019 18:58
Load *.eml files from a folder Usage: python sendmails.py --start path/to/
from multiprocessing import Pool
import os, sys
import email, smtplib
storage_folder = "data/export"
mail_server = 'server-address'
mail_username = 'mail-user'
mail_password = 'mail-password'
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