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
# Source: https://gist.github.com/4145515 | |
# | |
# All-purpose gist tool for Pythonista. | |
# | |
# When run directly, this script sets up four other scripts that call various | |
# functions within this file. Each of these sub-scripts are meant for use as | |
# action menu items. They are: | |
# | |
# Set Gist ID.py - Set the gist id that the current file should be | |
# associated with. |
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
on handle_string(str) | |
set arrayWithDate to my theSplit(str, "@") | |
if arrayWithDate's length > 1 then | |
set theDate to my parseDate(getArrayValue(arrayWithDate, 2)) | |
end if | |
set arrayWithBody to my theSplit(getArrayValue(arrayWithDate, 1), "#") | |
if arrayWithBody's length > 1 then | |
set reminderBody to my getArrayValue(arrayWithBody, 2) | |
else |
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 | |
import sys, paramiko | |
if len(sys.argv) < 5: | |
print "args missing" | |
sys.exit(1) | |
hostname = sys.argv[1] | |
password = sys.argv[2] |
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/python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
__all__ = ["transform"] | |
__version__ = '0.3' | |
__author__ = 'Christoph Burgmer <[email protected]>' | |
__url__ = 'http://github.com/cburgmer/upsidedown' |
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 os, os.path, sys, urllib2, requests, gzip, tarfile | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
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 Tools { | |
public static macro function extract(value:haxe.macro.Expr.ExprOf<EnumValue>, pattern:haxe.macro.Expr) { | |
return switch (pattern) { | |
case macro $a => $b: | |
macro switch ($value) { | |
case $a: | |
$b; | |
default: | |
throw "no match"; | |
} |
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 Main { | |
static function parseProperties(text:String):Map<String, String> { | |
var map:Map<String, String> = new Map(), | |
ofs:Int = 0, | |
len:Int = text.length, | |
i:Int, j:Int, | |
endl:Int; | |
while (ofs < len) { | |
// find line end offset: | |
endl = text.indexOf("\n", ofs); |
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 haxe.io.Bytes; | |
import haxe.Resource; | |
import openfl.Assets; | |
import openfl.display.Bitmap; | |
import openfl.display.BitmapData; | |
import openfl.display.Loader; | |
import openfl.utils.ByteArray; | |
/** |
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 entities; | |
import nape.geom.Vec2; | |
/** | |
* @author MSGHero | |
*/ | |
@:enum | |
abstract Direction(Int) { | |
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 hx.event.test; | |
import haxe.unit.TestRunner; | |
class Main | |
{ | |
public static function main() | |
{ | |
var runner = new TestRunner(); | |
runner.add(new SignalTest()); |
OlderNewer