Skip to content

Instantly share code, notes, and snippets.

View michael-k's full-sized avatar

Michael K. michael-k

  • North Ayrshire, Scotland
View GitHub Profile
@michael-k
michael-k / README.md
Last active August 29, 2015 14:20
Windpool Windparks

Icon windmill.svg was created by Edward Boatman and is licensed as Creative Commons – Attribution (CC BY 3.0).

Create TopoJSON file from GeoJSON files with:

topojson -o de-wind.json --id-property id --properties name=name --properties color=color --properties count=count -- de.geojson wind.geojson
@michael-k
michael-k / docker-compose.md
Last active October 28, 2015 14:47
workarounds

Error:

docker-compose up                                                                                                  :(
nummer5_celery_1 is up-to-date
Starting nummer5_data_1...
Cannot start container aad918df3938b44c4419799b309206e38e66d75e41daf99634444b3771c2fbdd: [8] System error: Unit docker-aad918df3938b44c4419799b309206e38e66d75e41daf99634444b3771c2fbdd.scope already exists.

Workaround:

from collections import defaultdict
import datetime
import pandas as pd
def data(filename='/home/mfk/Halbstd-Werte-Stuttgart-Mitte-SZ_2015.xls', sheetname='Okt. 2015'):
raw_data = pd.read_excel(
io=filename,
sheetname=sheetname,
#
# Copyright (C) 2013 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve
#!/bin/bash
set -e
# Installation
# 1. Setup go-acd (https://github.com/go-acd/acd). You need to chmod
# acd-token.json to 0600 and manually create $HOME/.config/acd.json
# like the following:
# {"tokenFile":"/home/you/.config/acd-token.json","cacheFile":"/home/you/.cache/go-acd.cache"}
# Then make sure the `acd` command works. Note that the first run may
# take some time as it will fetch the full list of your files on ACD.
## Böblinger-Strasse
curl -X POST "http://www.eco-public.com/ParcPublic/CounterData?table=ecobdd.%60Z_100034894%60&idOrganisme=607&idPdc=100034894&fin=09%2F06%2F2017&debut=01%2F01%2F2017&interval=4&pratiques=101034894%3B102034894%3B103034894%3B104034894"
## König-Karls-Brücke
curl -X POST "http://www.eco-public.com/ParcPublic/CounterData?table=ecobdd.%60Z_100037170%60&idOrganisme=607&idPdc=100037170&fin=09%2F06%2F2017&debut=01%2F01%2F2017&interval=4&pratiques="
@michael-k
michael-k / 01_postfix_installer.md
Created October 28, 2017 20:02 — forked from solusipse/01_postfix_installer.md
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Debian 7. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.

Usage

  1. Run postfix.sh script.
  2. Configure postgres to allow connections.
  3. Configure postfix admin. Remember to set these:
@michael-k
michael-k / ignition.json
Created April 26, 2019 22:31 — forked from thetechnick/ignition.json
Hetzner Cloud terraform coreos install
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {
},
"systemd": {},
"networkd": {},
"passwd": {

Keybase proof

I hereby claim:

  • I am michael-k on github.
  • I am mfk (https://keybase.io/mfk) on keybase.
  • I have a public key ASBdig80wPajgfKM30Ar_xbusDUhA1wtOMow56Genn7IHgo

To claim this, I am signing this object:

@michael-k
michael-k / tmux-cheatsheet.markdown
Created May 28, 2019 12:55 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname