lang | msec |
---|---|
(control) | 2.134 |
Lua | 15.164 |
LuaJIT | 12.531 |
Squirrel | 22.273 |
V8 | 100.93 |
mruby | 36.118 |
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
dummy |
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 ruby | |
class Node | |
attr_accessor :size, :num, :left, :right | |
def initialize(n) | |
self.size = 1 | |
self.num = n | |
self.left = nil | |
self.right = nil |
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
(defun server () | |
(zmq:with-context (ctx) | |
(zmq:with-socket (socket ctx :rep) | |
(zmq:bind socket "tcp://127.0.0.1:5555") | |
(loop | |
(let ((query (make-instance 'zmq:msg))) | |
(zmq:recv socket query) | |
(let ((req-string (zmq:msg-data-as-string query))) | |
(format t "Recieved message: '~A'~%" req-string) | |
(zmq:send socket (make-instance 'zmq:msg :data req-string)) )))))) |
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 ruby | |
require 'active_record' | |
$db, $chatname = ARGV | |
if $db.nil? or $chatname.nil? | |
puts "usage: #{__FILE__} <db> <chatname>" | |
exit 1 | |
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
def once(tag) | |
unless (@__once_executed__ ||= []).include? tag | |
yield | |
@__once_executed__ << tag | |
end | |
end | |
module Jekyll | |
class Post |
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 os | |
import sys | |
import time | |
import logging | |
from watchdog.observers import Observer | |
from watchdog.events import LoggingEventHandler | |
import paramiko | |
import getpass |
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 platform in iPhoneOS iPhoneSimulator; do | |
BUILD_DIR=`pwd`/build.$platform | |
if [[ -d $BUILD_DIR ]]; then | |
rm -fr $BUILD_DIR | |
fi | |
mkdir -p $BUILD_DIR |
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 ssh-aws() { | |
KEY=$1 | |
NAME=$2 | |
if which list_instances >/dev/null; then | |
CMD="ssh -i $KEY root@`list_instances $* -H T:Name,Hostname | awk '{ if ("'$NAME'"==¥$1) print ¥$2}'`" | |
echo $CMD | |
sh -c $CMD | |
else | |
echo please install boto; |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Menu Key Bindings</key> | |
<dict> | |
<key>Key Bindings</key> | |
<array> | |
<dict> | |
<key>Action</key> |
NewerOlder