Skip to content

Instantly share code, notes, and snippets.

View dirkk0's full-sized avatar

Dirk Krause dirkk0

View GitHub Profile
@dirkk0
dirkk0 / gist:655c5a27e718597a8913
Last active August 29, 2015 14:07
Install Minetest Server with Carbone on Ubuntu 12.04 in Amazon EC2
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
@dirkk0
dirkk0 / new_xample.py
Last active August 29, 2015 14:06
edited
import new_code
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
@dirkk0
dirkk0 / test.html
Created February 13, 2014 06:57
timbre.js drag&drop mp3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Decode</title>
</head>
<body>
drag & drop an audio file.
<ul style="list-style:none">
@dirkk0
dirkk0 / test.py
Created February 5, 2014 08:57
python script to send mail including docopt
#!/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:
import sys
import smtplib
def sendemail(from_addr, to_addr_list, cc_addr_list,
subject, message,
login, password,
smtpserver='smtp.gmail.com:587'):
header = 'From: %s\n' % from_addr
header += 'To: %s\n' % ','.join(to_addr_list)
header += 'Cc: %s\n' % ','.join(cc_addr_list)
# install latest node
sudo add-apt-repository --yes ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --yes nodejs
# install java
sudo apt-get -y install openjdk-7-jdk
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=${PATH}:${JAVA_HOME}/bin
@dirkk0
dirkk0 / webaudio1.html
Created December 15, 2013 11:44
Minimal WebAudio example - creates white noise for a couple of seconds.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset=utf-8 />
<title>Web Audio API</title>
<style type='text/css'>
</style>
</head>
@dirkk0
dirkk0 / install_couchdb.sh
Last active December 30, 2015 02:49
Install CouchDB 1.4 on Ubuntu 12.04
# via
# http://wiki.apache.org/couchdb/Installing_on_Ubuntu
cd /tmp
wget http://mirror.netcologne.de/apache.org/couchdb/source/1.4.0/apache-couchdb-1.4.0.tar.gz
### make sure you have a couchdb user for the daemon, and couchb group also
## get developer tools dependencies
sudo apt-get install -y g++
sudo apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets
@dirkk0
dirkk0 / xstartup
Last active December 29, 2015 22:29
vnc
#!/bin/sh
gnome-session –session=gnome-classic &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
sh exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
# x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &