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
class Boomstick(Achievement): | |
name = "This is my Boomstick" | |
description = "checking in code which uses every single function " + | |
"in itertools" | |
def __init__(self): | |
import itertools | |
self.needed = set(export for export in dir(itertools) | |
if not export.startswith("_")) |
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
package utils.testlisteners { | |
import flash.external.ExternalInterface; | |
import mx.events.DynamicEvent; | |
/** | |
* Reports the results of a TextTestListener into the browser, using HTML | |
* instad of Flash. | |
*/ |
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
See: http://bitbucket.org/wolever/hg-setpath |
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
package utils { | |
import org.flexunit.internals.runners.statements.IAsyncStatement; | |
import org.flexunit.internals.runners.statements.MethodRuleBase; | |
import org.flexunit.rules.IMethodRule; | |
import org.flexunit.runners.model.FrameworkMethod; | |
import org.flexunit.token.AsyncTestToken; | |
import org.flexunit.token.ChildResult; | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:text="flash.text.*"> | |
<mx:Script><![CDATA[ | |
import flash.utils.setTimeout; | |
protected function range(n:int):Array { | |
var result:Array = []; | |
while (n-- > 0) | |
result.push(n); | |
return result; | |
} |
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
#!/bin/bash | |
set -e | |
if [[ `whoami` != "root" ]] | |
then | |
echo "Gotta be root..." | |
exit $? | |
fi |
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
#!/usr/bin/env python | |
""" | |
Usage: fixpackages SRC_DIR [SRC_DIR ...] | |
Fix actionscript packages by updating the 'package <name>' statement in | |
applicable files and updating any import statements which reference the | |
old package. | |
To use: | |
- Move files to their new locations (eg, src/old/Foo.as to src/new/Foo.as) |
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
package serialization { | |
import flash.utils.ByteArray; | |
import utils.logger.Log; | |
/** | |
* Serializes 'obj'. If serialization fails, tries really hard to figure | |
* out what caused it to fail. | |
*/ |
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
#!/usr/bin/env python | |
""" | |
Exports a list of all image files in a Lightroom catalog. | |
Known issues: | |
- Doesn't understand virtual copies (the original filename will be listed once | |
for each virtual copy) | |
- Hard-coded to sort by capture time (see "ORDER BY" clause in | |
'list_collection') | |
""" |
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
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. |