This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.sql.Sql | |
class OrphanNodesTool { | |
Sql sql; | |
String schema; | |
Set<String> tablesTargetedByForeignKeys() { | |
def query = '''\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// 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": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version 3: Moving Around | |
int px = 320, py = 240; | |
int tileSize = 20; | |
class Enemy { | |
color c; | |
int x, y; | |
String name; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version 2: Enemies | |
int px = 320, py = 240; | |
int tileSize = 20; | |
class Enemy { | |
color c; | |
int x, y; | |
String name; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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() { |