Skip to content

Instantly share code, notes, and snippets.

Avatar

Dirk Krause dirkk0

View GitHub Profile
@dirkk0
dirkk0 / test.py
Created Feb 5, 2014
python script to send mail including docopt
View test.py
#!/usr/bin/env python
"""Mail.
Usage:
mail.py (-h | --help)
mail.py --version
mail.py [--to <to>] [--from <from>] [--cc <cc>] [--subject <subject>] [--message <message>]
Options:
@dirkk0
dirkk0 / test.html
Created Feb 13, 2014
timbre.js drag&drop mp3
View test.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Decode</title>
</head>
<body>
drag & drop an audio file.
<ul style="list-style:none">
View xstartup
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
@dirkk0
dirkk0 / gist:655c5a27e718597a8913
Last active Aug 29, 2015
Install Minetest Server with Carbone on Ubuntu 12.04 in Amazon EC2
View gist:655c5a27e718597a8913
sudo apt-get update
sudo apt-get install --yes htop unzip
sudo apt-get install --yes python-software-properties
sudo add-apt-repository --yes ppa:minetestdevs/stable
sudo apt-get update
sudo apt-get install --yes minetestc55
wget https://gitorious.org/calinou/carbone/archive/master.zip -O carbone.zip
unzip carbone.zip
View gist:715257c80b3fc5ac7e86
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<script>
var vegetables = [{
"name": "Carrot"
}, {
"name": "Potato"
}, {
"name": "Broccoli"
}];
View redirect.html
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="refresh" content="0;url=http://google.de">
</head>
<body>
Attempting to redirect to <a href="http://google.de">http://google.de</a>.
</body>
</html>
@dirkk0
dirkk0 / doit.sh
Last active Aug 29, 2015
Installing ppnet/ppnet-proxy on EC2/Ubuntu14
View doit.sh
sudo apt-get update
sudo apt-get -y install couchdb
# curl http://localhost:5984
sudo apt-get install -y python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
@dirkk0
dirkk0 / 1.py
Created Mar 11, 2015
Read Trello API by board, list, card
View 1.py
# 1.py
# pip2 install trello
# https://pythonhosted.org/trello/trello.html
import pprint
pp = pprint.PrettyPrinter(indent=4)
import credentials
key = credentials.key
@dirkk0
dirkk0 / test_app.py
Last active Aug 29, 2015
Using the jsontemplate engine (or, the beauty of python)
View test_app.py
# via http://json-template.googlecode.com/svn/trunk/doc/Introducing-JSON-Template.html
import jsontemplate
import json
# load template
template = open('test_template.html', 'r').read()
# load data
data = json.loads(open('test_data.json', 'r').read())
You can’t perform that action at this time.