Skip to content

Instantly share code, notes, and snippets.

View dirkk0's full-sized avatar

Dirk Krause dirkk0

View GitHub Profile
@dirkk0
dirkk0 / gist:9b325888a268a595bfce
Last active September 28, 2015 13:14
install_android.sh
sudo apt-get install --yes build-essential curl git unzip
# install java
sudo apt-get -y install openjdk-7-jdk
# make exports persistent
echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" >> ~/.bashrc
echo "export PATH=\${PATH}:\${JAVA_HOME}/bin" >> ~/.bashrc
source ~/.bashrc
# install 32-bit dependencies
@dirkk0
dirkk0 / main.cpp
Last active August 3, 2023 23:08
Basic SDL2 OpenGL application
// code nicked mainly from here:
// http://lazyfoo.net/tutorials/SDL/50_SDL_and_opengl_2/index.php
/* to compile
### installation on ubuntu
# install compiler etc
sudo apt-get install --yes software-properties-common g++ make
# install sdl2
@dirkk0
dirkk0 / install_phonegap.sh
Created March 19, 2015 16:35
install phonegap/cordova on ubuntu12/ec2
# always a good idea
sudo apt-get update
# just to make sure
sudo apt-get curl git
# install latest node
sudo add-apt-repository --yes ppa:chris-lea/node.js
sudo apt-get update
@dirkk0
dirkk0 / test_app.py
Last active August 29, 2015 14:16
Using the jsontemplate engine (or, the beauty of python)
# 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())
@dirkk0
dirkk0 / 1.py
Created March 11, 2015 17:52
Read Trello API by board, list, card
# 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 / doit.sh
Last active August 29, 2015 14:16
Installing ppnet/ppnet-proxy on EC2/Ubuntu14
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
<!DOCTYPE HTML>
<html>
<head>
<title>T11</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #000000;
@dirkk0
dirkk0 / heydey.js
Created November 15, 2014 18:33
Isometric tiles in pixi.js
var w = 600
var h = 380
var stage = new PIXI.Stage(0x66FF99);
var renderer = PIXI.autoDetectRenderer(w, h);
document.body.appendChild(renderer.view);
requestAnimFrame(animate);
var n = 12; // CHANGE THIS
<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>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<script>
var vegetables = [{
"name": "Carrot"
}, {
"name": "Potato"
}, {
"name": "Broccoli"
}];