Skip to content

Instantly share code, notes, and snippets.

View webwurst's full-sized avatar

Tobias Bradtke webwurst

View GitHub Profile
@webwurst
webwurst / flaskr.py
Created March 6, 2012 11:09
This is the Flaskr-Tutorial using CouchDB instead of sqlite. For the original Tutorial see http://flask.pocoo.org/docs/tutorial/.
# -*- coding: utf-8 -*-
"""
Flaskr
~~~~~~
A microblog example application written as Flask tutorial with
Flask and couchdbkit.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
@webwurst
webwurst / Dockerfile
Last active July 10, 2018 08:57
Kubernetes Python Client
FROM python:3.4
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN pip install /usr/src/app
# docker build --tag local/kubernetes .
# docker run -v $HOME/.kube:/root/.kube -v $PWD:$PWD -w $PWD -ti local/kubernetes python
@webwurst
webwurst / pyside_webkit_javascript.py
Created March 26, 2012 08:01
PySide/WebKit/Javascript
import sys
from PySide.QtCore import QObject, Slot
from PySide.QtGui import QApplication
from PySide.QtWebKit import QWebView
html = """
<html>
<body>
<h1>Hello!</h1><br>
@webwurst
webwurst / Dockerfile
Last active January 11, 2018 17:05 — forked from henrik-muehe/Dockerfile
# Fake a fuse install
# from https://gist.github.com/henrik-muehe/6155333/e35981031bad80ada4cbf1e4a48ba7f86a019db4
# see https://github.com/dotcloud/docker/issues/2191
run apt-get install libfuse2
run cd /tmp &&\
apt-get download fuse &&\
dpkg-deb -x fuse_* . &&\
dpkg-deb -e fuse_* &&\
rm fuse_*.deb &&\
echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst &&\
#!/bin/bash
# Copyright 2017 Mirantis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/bin/sh
systemctl stop docker.service
rm $(which docker)
rm /var/run/docker.pid
curl -fsSL https://github.com/armhf-docker-library/binaries/releases/download/1.10.1/docker-1.10.1 \
-o /usr/bin/docker
chmod u+x /usr/bin/docker
@webwurst
webwurst / systemd-ubuntu.md
Last active October 30, 2016 03:30
systemd-ubuntu
# using scaleway-cli to create a new host

scw create \
  --name kube-1 \
  --commercial-type VC1M \
  --volume 50G \
  --env "kubeadm master" \