ruby 1.9.2 + async_sinatra + thin thin start
ab -n 10000 -c 100 http://localhost:3000/
-> 49ms / request
node server.js
| module GlobalConstant | |
| AUTORESOLVE = [] | |
| AUTOIMPORT = [] | |
| def self.install | |
| Object.instance_eval do | |
| class << self | |
| alias old_const_missing const_missing | |
| def const_missing constant | |
| to_check = GlobalConstant::AUTORESOLVE.keep_if { |m| m.singleton_class == self } + GlobalConstant::AUTOIMPORT |
| require "sinatra" | |
| require "slim" | |
| require "coffee-script" | |
| require "sass" | |
| require "eventmachine" | |
| get "/" do | |
| slim :html | |
| end |
| #!/bin/bash | |
| thin start -p 3000 -R test.ru |
| { | |
| ip4_expression: /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, | |
| ip6_expression: /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-F |
| global.MyModule = require "MyModule" | |
| PATH = "./" # Define your Path | |
| require("#{PATH}/node_modules/coffee-script/lib/coffee-script/command.js").run() |
| <a href="javascript:(function(){ms=document.createElement('SCRIPT');ms.type='text/javascript';ms.src='http://mysite.com/script.js?';document.getElementsByTagName('head')[0].appendChild(ms); | |
| })();">Drag & Drop to your Bookmark (or copy / paste link)</a> | |
| spawn = require('child_process').spawn | |
| bash = spawn "bash", ["-i"] | |
| bash.stdin.write "export PS1=wrapped:$PS1\n" | |
| process.stdin.pipe(bash.stdin) | |
| process.stdin.resume() | |
| require('tty').setRawMode(true) | |
| bash.stderr.pipe(process.stderr) | |
| bash.stdout.pipe(process.stdout) |
| StackObjError = require "stack_trace_with_line_from_code" | |
| first_func = -> | |
| second_func = -> | |
| console.log JSON.stringify(new StackObjError().stack) | |
| second_func() | |
| first_func() |
| fs = require "fs" | |
| es = require('event-stream') | |
| zipstream = require("zipstream") | |
| app = require("express")() | |
| files = ["rt_p2p_server.coffee", "rt_p2p_server.screen"] | |
| addFile = (files) -> | |
| unless files.length | |
| zip.finalize -> |