Skip to content

Instantly share code, notes, and snippets.

@Drakekin
Drakekin / preg_replace_test.php
Created April 26, 2011 11:02
Parsing for bug numbers with preg_replace
<?php
$pattern = "/(#)([0-9]+)/";
$replace = "<a href='http://mysite.com/bug/$2/'>#$2</a>";
$text = "The bug #40 was replaced fixed, but then caused bug #87 and #89. I think we fixed it when we caused bug #212 though.";
echo preg_replace($pattern, $replace, $text);
?>
<!--
Output:
The bug <a href='bug/40/'>#40</a> was replaced fixed, but then caused bug <a href='bug/87/'>#87</a> and <a href='bug/89/'>#89</a>. I think we fixed it when we caused bug <a href='bug/212/'>#212</a> though.
-->
@Drakekin
Drakekin / test.py
Created February 5, 2012 02:00
Test
def test(msg):
print msg
[translation:info] Error:
[translation:info] File "/home/drake/rpy/pypy/rpython/translator/goal/translate.py", line 318, in main
[translation:info] drv.proceed(goals)
[translation:info] File "/home/drake/rpy/pypy/rpython/translator/driver.py", line 534, in proceed
[translation:info] return self._execute(goals, task_skip = self._maybe_skip())
[translation:info] File "/home/drake/rpy/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
[translation:info] res = self._do(goal, taskcallable, *args, **kwds)
[translation:info] File "/home/drake/rpy/pypy/rpython/translator/driver.py", line 283, in _do
[translation:info] res = func()
[translation:info] File "/home/drake/rpy/pypy/rpython/translator/driver.py", line 320, in task_annotate
<img src="/static/foo.png">
when served from foo.example.tld will request foo.example.tld/static/foo.png
but when served from bar.example.tld will request bar.example.tld/static/foo.png
app = Flask(__name__)
registered_blueprints = {}
for blueprint, subdomains in blueprints:
for subdomain in subdomains:
app.register_blueprint(blueprint, subdomain=subdomain)
registered_blueprints[subdomain.lower()] = blueprint

Demons of Chaos Army: 740pts

Heros:

  • Herald of Khorne with Exaulted Locus of Wrath (175pts)

Core:

  • 10 Bloodletters of Khorne with Champion, Musician and Standard Bearer (170pts)
  • 10 Bloodletters of Khorne with Champion, Musician and Standard Bearer (170pts)

Special:

@Drakekin
Drakekin / month_one.md
Created November 29, 2014 23:51
Slow Grow Undead Legion

Undead Legion Slow Grow Month One (746pts)

Undead Legions (2014) (Standard) (746pts)

Heroes (222pts)

  • Vampire (111pts)

    Heavy Armour, Lore of Undeath, Shield, Wizard Level 1

  • Vampire (111pts)

Slow Grow Month Two (1498pts)

Undead Legions (2014) (End Times) (1498pts)

Lords (544pts)

  • Vampire Lord (544pts)

    Heavy Armour, Lore of Undeath, Shield, Wizard Level 3, Zombie Dragon

Heroes (146pts)

Strikeforce Omega (1500pts)

Blood Angels: Codex (2014) (Baal Strike Force) (1500pts)

HQ (185pts)

  • Librarian Dreadnought (185pts)

    Psychic Pilot (ML2)

    • Power fist

Slow Grow Month Two (1500pts)

Undead Legions (2014) (Standard) (1500pts)

Lords (564pts)

  • Vampire Lord (564pts)

    Dread Knight, Heavy Armour, Lance, Lore of Undeath, Shield, Wizard Level 3, Zombie Dragon

Heroes (136pts)