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
--------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------- | |
-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-4-6-6-6-6-6-6-6-6-7-7-7-7-7-7-7-7-9--9--9--9--9--9--9--9--6-6-6-6-6-6-6-6- | |
-2-2-2-2-2-2-2-2-4-4-4-4-4-4-4-4-6-6-6-6-6-6-6-6-7-7-7-7-7-7-7-7-11-11-11-11-11-11-11-11-6-6-6-6-6-6-6-6- |
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
require "stripe" | |
require "time" | |
Stripe.api_key = ENV['STRIPE_KEY'] | |
start_of_month = Time.parse(Time.now.strftime('1-%b-%Y 00:00:00 UTC')) | |
def created_after(object, time) | |
offset = 0 | |
objects = object.all(count:100, offset: offset, created: { gte: time.to_i }).to_a |
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
var collectionNames = db.getCollectionNames(); | |
for(var i = 0, len = collectionNames.length; i < len ; i++){ | |
var collectionName = collectionNames[i]; | |
if(collectionName.indexOf('logs_') == 0){ | |
print(i + '/' + len + ':' + collectionName); | |
db[collectionName].drop(); | |
} | |
} |
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 | |
old_etag=$(curl --silent http://api.openkeyval.org/minecraft-etag) | |
new_etag=$(curl --silent --head https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar | grep ETag | awk -F\" '{print $2}') | |
if [ $old_etag != $new_etag ]; then | |
echo "event=updated old=$old_etag new=$new_etag" | |
curl --silent -X POST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_USER/SMS/Messages.json \ | |
-u $TWILIO_USER:$TWILIO_PASS \ | |
-d "From=$SMS_FROM" \ |
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
/* | |
Possible names: Reaktor, Fat Controller | |
ideas: | |
bind/unbind between states? | |
allow machines to be shared, overriding states on instance | |
$('#target').machine({ | |
stopped : { | |
enter : ['a.pause:hide', 'a.play:show'], | |
exit : ..., |
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
2012-07-31 11:44:59 [INFO] /ban <name> [reason ...] | |
2012-07-31 11:44:59 [INFO] /ban-ip <address|name> [reason ...] | |
2012-07-31 11:44:59 [INFO] /banlist [ips|players] | |
2012-07-31 11:44:59 [INFO] /debug | |
2012-07-31 11:44:59 [INFO] /defaultgamemode <mode> | |
2012-07-31 11:44:59 [INFO] /deop <player> | |
2012-07-31 11:44:59 [INFO] /gamemode <mode> [player] | |
2012-07-31 11:45:05 [INFO] /give <player> <item> [amount] [data] | |
2012-07-31 11:45:05 [INFO] /help [page|command name] | |
2012-07-31 11:45:05 [INFO] /kick <player> [reason ...] |
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
2012-05-27 11:59:06 Welcome to Minecraft Overviewer! | |
2012-05-27 11:59:06 Checking all tiles for updates manually. | |
******************************************************************************* | |
2012-05-27 11:59:06 E An error has occurred. This may be a bug. Please let us know! | |
See http://docs.overviewer.org/en/latest/index.html#help | |
This is the error that occurred: | |
Traceback (most recent call last): | |
File "overviewer/overviewer.py", line 493, in <module> | |
ret = main() |
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
2012-05-27 11:34:09 Welcome to Minecraft Overviewer! | |
2012-05-27 11:34:09 Checking all tiles for updates manually. | |
2012-05-27 11:34:31 Rendered 0 of 22369621. 0% complete | |
******************************************************************************* | |
2012-05-27 11:34:35 E An error has occurred. This may be a bug. Please let us know! | |
See http://docs.overviewer.org/en/latest/index.html#help | |
This is the error that occurred: | |
Traceback (most recent call last): | |
File "overviewer/overviewer.py", line 493, in <module> |
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
multi = EventMachine::Multi.new | |
multi.add :query1, query1 | |
multi.add :query2, query2 | |
multi.callback do |results| | |
puts results | |
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
require 'em-hiredis' | |
module EMServer | |
def post_init | |
puts "-- someone connected to the echo server!" | |
end | |
def receive_data data | |
redis = EM::Hiredis.connect | |
redis.callback do |