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
// TARGET.pid のファイルを削除で終了 | |
if ( WScript.Count == 0 ) { | |
WScript.Echo("対象ファイルをD&Dしてください"); | |
WScript.Quit(); | |
} | |
var TARGET = WScript.Arguments(0); | |
// バックアップするかチェックする間隔(ミリ秒) | |
var PERIOD = 60 * 1000; | |
var AutoBackup = { |
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
from itty import * | |
import Queue | |
import threading | |
queue = Queue.Queue() | |
message_count = 0 | |
message_count_lock = threading.Lock() | |
finish_queue = False | |
finish_queue_lock = threading.Lock() | |
wait_for_it = threading.Event() |
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
/* | |
* Copyright (c) 2009 Gaute Hope <[email protected]> | |
* Distributed under the terms of the GNU General Public Licence v2 | |
* | |
* Waits for change of ~/.plan | |
* | |
*/ | |
# include <iostream> | |
# include <sys/inotify.h> |
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 socket | |
def sockrecv(sock): | |
d = '' | |
while not d or d[-1] != '\n': | |
d += sock.recv(8192) | |
return d | |
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
LUAOBJECT_GRAMMAR = %q{ | |
grammar LuaObject | |
rule luaobj | |
space value space { def to_ruby; value.to_ruby; end } | |
end | |
rule value | |
nil / float / number / string / table / boolean | |
end |
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
## Function | |
traverse("object", obj, function(key, val) {console.log(key, val)}); | |
## Call | |
function traverse(key, jsonObj, func) { | |
if( typeof jsonObj == "object" ){ | |
$.each(jsonObj, function(k,v) { | |
traverse(k,v); | |
}) | |
} 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
// 同時実行されてしまう | |
for (var i:uint = 0; i < len; i++) { | |
var loader:URLLoader = new URLLoader(); | |
loader.addEventListener(Event.COMPLETE, fun (..._) {}); | |
loader.load(t[i]); | |
} | |
// 順次実行 | |
var i:uint = 0; (function cont (..._):void { if (i++ < parts) { | |
var loader:URLLoader = new URLLoader(); |
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 | |
""" | |
Regex for URIs | |
These regex are directly derived from the collected ABNF in RFC3986 | |
(except for DIGIT, ALPHA and HEXDIG, defined by RFC2234). | |
They should be processed with re.VERBOSE. | |
""" |
NewerOlder