ruby 1.9.2 + async_sinatra + thin thin start
ab -n 10000 -c 100 http://localhost:3000/
-> 49ms / request
node server.js
browserify = require 'browserify-middleware' | |
mdns = require "mdns" | |
os = require "os" | |
util = require "util" | |
_ = require "underscore" | |
request = require "request" | |
require "colors" | |
PORT = parseInt(process.argv[2]) or 3001 | |
require("zappajs") PORT, -> |
<element name="cs-component"> | |
<template> | |
I am a {{ language }} component | |
</template> | |
<script type="text/coffeescript"> | |
Polymer.register @, | |
language: "CoffeeScript" | |
ready: -> | |
console.log "READY", @ | |
</script> |
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 -> |
StackObjError = require "stack_trace_with_line_from_code" | |
first_func = -> | |
second_func = -> | |
console.log JSON.stringify(new StackObjError().stack) | |
second_func() | |
first_func() |
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) |
<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> | |
global.MyModule = require "MyModule" | |
PATH = "./" # Define your Path | |
require("#{PATH}/node_modules/coffee-script/lib/coffee-script/command.js").run() |
{ | |
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 |
#!/bin/bash | |
thin start -p 3000 -R test.ru |