Skip to content

Instantly share code, notes, and snippets.

View syranez's full-sized avatar

Michael Nowack syranez

  • Würzburg, Germany
View GitHub Profile
# Färbt die Tipps entsprechend des Ergebnisses farbig ein.
#
# Argumente
# 1: ID des Spiels
#
# Return
# HTML-String <span><font>FIRST_SCORE</font> : <font>SECOND_SCORE</font></span>
#
# Gibt es keinen Tipp für eine Begegnung, so wird ein Nullstring zurückgegeben.
# Ansonsten wird der Tipp des Spielers mit dem Ergebnis verglichen und je nach
/*
Wann wird welche Variable vom GC freigeben?
*/
public final class Foo {
private JDialog bar = new JDialog();
public static void Main(String[] s) {
JDialog xyz = new JDialog();
xyz.show();
@syranez
syranez / Liste.h
Created September 29, 2010 20:45 — forked from AVGP/Liste.h
#include <iostream>
#include <cassert>
class ListenElement {
public:
ListenElement ( const int pValue, ListenElement * pNext = 0 ) {
value = pValue;
next = pNext;
}
@syranez
syranez / gist:1179100
Created August 29, 2011 18:49
CompareArray-Verwendung
38 $comparer = new fcmsUnit_CompareArray();
39 $comparer->ignore(fcmsUnit_CompareArray::IGNORE_WHITESPACE |
40 fcmsUnit_CompareArray::IGNORE_EMPTY |
41 fcmsUnit_CompareArray::IGNORE_NULL);
42 $comparer->ignoreKey("antz.body");
43 $comparer->compare($fcms_data, $fcms2_data);
44
45 $difference = $comparer->getDiff();
46
47 $this->assertEmpty($difference, 'Unterschied: ' . var_export($difference, true));
@syranez
syranez / crawl_top100entries.sh
Created August 29, 2011 21:11
Anzahl der Einträge pro Spieler der Highscoreliste von crawl.christoph-d.de berechnen
#!/bin/bash
PLAYERS="syranez MrN Christoph Plasmo godot";
declare -A ranking;
for name in $PLAYERS
do
c=0;
c=`wget 'http://crawl.christoph-d.de/scores.txt' -q -O - | grep "name=$name" -c`
@syranez
syranez / crawljson.php
Created September 11, 2011 14:58
Konvertiert scores.txt von christoph-d in ein JSON-Objekt.
<?php
namespace CrawlChristophdDe;
/**
* konvertiert die Highscoreliste von Dungeon Crawl bei Christoph in
* ein JSON-Objekt
*
* Verwendung:
*
@syranez
syranez / gist:1219930
Created September 15, 2011 17:41
Codingstyle: JavaScript
var module = (function() {
/**
* Berechnet die Längendifferenz der zwei Strings und gibt sooft den ersten String aus.
*
* Ist baz.length <= bar.length, wird nur baz ausgegeben.
*
* @param string bar
* @param string baz
*/
@syranez
syranez / gist:1227422
Created September 19, 2011 19:56
git fial.
syranez @ marathon :: ~/.vim %% git rebase 376c62b4505258cc5058ce12d64853b46effe102
First, rewinding head to replay your work on top of it...
Applying: VCSCommand eingebunden. Nur für CVS.
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
CONFLICT (rename/delete): Rename syntax/mkd.vim->syntax/vcscommand/mkd.vim in HEAD and deleted in VCSCommand eingebunden. Nur für CVS.
Failed to merge in the changes.
Patch failed at 0001 VCSCommand eingebunden. Nur für CVS.
When you have resolved this problem run "git rebase --continue".
@syranez
syranez / gist:1229985
Created September 20, 2011 19:01
typo fixed
* Compile app-editors/vim with +vim-pager
* Create /etc/env.d/70pager with
PAGER=vimpager
MANPAGER=vimmanpager
pager=$PAGER
* Create /etc/profile.d/pager (Sets the vimpager system-wide)
@syranez
syranez / deutschrap.txt
Last active September 27, 2015 07:18
Deutschrap Stand 16. Juli 2013
257ers-HRNSHN.ogg.m3u
3Plusss-Kindskopf_LP.ogg.m3u
[*] 4tune-Re_Generation
[*] 58Muzik-Doomsday_EP
Absolute_Beginner-Flashnizm_(Stylopath).ogg.m3u
Absolute_Beginner-The_Early_Years.ogg.m3u
Afrob-Der_letzte_seiner_Art.ogg.m3u
Afrob-Hammer.ogg.m3u
Afrob-Made_In_Germany.ogg.m3u
Al-Gear-Kein_Feat._Für_Spastis.ogg.m3u