Skip to content

Instantly share code, notes, and snippets.

@digulla
digulla / c't_Inhaltsverzeichnis_sortieren.user.js
Last active August 29, 2015 14:12
Sortiert das Inhaltsverzeichnis der c't nach Seitenzahl, wenn man auf "aktuell" klickt
// ==UserScript==
// @name c't Inhaltsverzeichnis sortieren
// @namespace http://www.pdark.de/
// @version 1.0
// @description Sortiert das Inhaltsverzeichnis der c't nach Seitenzahl, wenn man auf "aktuell" klickt
// @match https://www.heise.de/artikel-archiv/ct/*
// @copyright 2014+, Aaron Digulla
// @grant unsafeWindow
// ==/UserScript==
@digulla
digulla / OrphanNodesTool.groovy
Created October 24, 2014 10:20
Groovy tool to count, list or delete orphaned nodes in a database with proper FK relations
import groovy.sql.Sql
class OrphanNodesTool {
Sql sql;
String schema;
Set<String> tablesTargetedByForeignKeys() {
def query = '''\
@digulla
digulla / Default (Linux).sublime-keymap
Last active August 21, 2018 16:34
Eclipse keyboard mapping for Sublime Text 2+3, based on https://gist.github.com/thbkrkr/3194275
// Put this in .../Packages/User/Default (**YOUR_OS_HERE**).sublime-keymap
[
// Eclipse keyboard mapping for Sublime Text 2+3, based on https://gist.github.com/thbkrkr/3194275
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
@digulla
digulla / RunPlattyRun_V7
Created December 18, 2013 20:51
Writing Games with Processing: Highscore!
// Version 7: Scoring
int px = 320, py = 240;
int tileSize = 20;
int score = 0;
int signum(float value) {
return value < 0 ? -1 : value > 0 ? 1 : 0;
}
@digulla
digulla / RunPlattyRun_V6
Created December 18, 2013 15:09
Writing Games with Processing: Winning
// Version 6: Winning the game
int px = 320, py = 240;
int tileSize = 20;
int signum(float value) {
return value < 0 ? -1 : value > 0 ? 1 : 0;
}
class Enemy {
@digulla
digulla / RunPlattyRun_V5
Last active December 31, 2015 17:39
Writing Games with Processing: Eating Platty
// Version 5: Eating Platty
int px = 320, py = 240;
int tileSize = 20;
int signum(float value) {
return value < 0 ? -1 : value > 0 ? 1 : 0;
}
class Enemy {
@digulla
digulla / RunPlattyRun_V4
Created December 18, 2013 11:59
Writing Games with Processing: Hunting Platty
// Version 4: Hunting Platty
int px = 320, py = 240;
int tileSize = 20;
int signum(float value) {
return value < 0 ? -1 : value > 0 ? 1 : 0;
}
class Enemy {
@digulla
digulla / RunPlattyRun_V3
Last active December 31, 2015 11:19
Writing Games with Processing: Moving Around
// Version 3: Moving Around
int px = 320, py = 240;
int tileSize = 20;
class Enemy {
color c;
int x, y;
String name;
@digulla
digulla / RunPlattyRun_V2
Created December 15, 2013 21:59
Writing Games with Processing: Enemies
// Version 2: Enemies
int px = 320, py = 240;
int tileSize = 20;
class Enemy {
color c;
int x, y;
String name;
@digulla
digulla / RunPlattyRun_V1
Created December 15, 2013 21:45
Writing Games with Processing: Setup and a Simple Player Character
// Version 1: Setup and a Simple Player Character
void setup() {
size(640, 480); //VGA for those old enough to remember
}
int px = 320, py = 240;
int tileSize = 20;
void drawPlatty() {