ruby 1.9.2 + async_sinatra + thin thin start
ab -n 10000 -c 100 http://localhost:3000/
-> 49ms / request
node server.js
import fcntl | |
import os | |
import struct | |
import subprocess | |
# Some constants used to ioctl the device file. I got them by a simple C | |
# program. | |
TUNSETIFF = 0x400454ca | |
TUNSETOWNER = TUNSETIFF + 2 |
# Rails developers have long had bad experiences with fixtures for | |
# several reasons, including misuse. | |
# | |
# Misuse of fixtures is characterized by having a huge number of them, | |
# requiring the developer to maintain a lot of data and creating dependencies | |
# between tests. In my experience working (and rescuing) many applications, 80% | |
# of fixtures are only used by 20% of tests. | |
# | |
# An example of such tests is one assuring that a given SQL query with | |
# GROUP BY and ORDER BY conditions returns the correct result set. As expected, |
# Forked to get it working with Rails 3 and RSpec 2 | |
# | |
# From http://github.com/jaymcgavren | |
# | |
# Save this as rcov.rake in lib/tasks and use rcov:all => | |
# to get accurate spec/feature coverage data | |
# | |
# Use rcov:rspec or rcov:cucumber | |
# to get non-aggregated coverage reports for rspec or cucumber separately |
# by Paul Callaghan, Nov 2010. | |
# this uses method-missing to trigger generation and execution of the corresponding relation | |
# eg Product.name_equals("yay") | |
# TODO: M_S doesn't check for unexpected values, eg match failures in | |
# matches_attribute_method (so we trap exceptions) | |
module MetaSearchHacks | |
def self.build_rel(base_or_scope, method, *args) |
# Run with this: | |
# $ curl "https://gist.github.com/raw/748530/5e74315dc6b6fe572f8a457536ad7eb17ad3f1e4/a.rb" > a.rb; while true; do clear; ruby a.rb | tee b.rb; sleep 0.3; mv -f b.rb a.rb; done | |
# Source: http://mamememo.blogspot.com/2010/09/qlobe.html | |
v=0000;eval$s=%q~d=%!^Lcf<LK8, _@7gj*LJ=c5nM)Tp1g0%Xv.,S[<>YoP | |
4ZojjV)O>qIH1/n[|2yE[>:ieC "%.#% :::##" 97N-A&Kj_K_><wS5rtWk@*a+Y5 | |
yH?b[F^e7C/56j|pmRe+:)B "##% ::##########" O98(Zh)'Iof*nm.,$C5Nyt= | |
PPu01Avw^<IiQ=5$'D-y? "##: ###############" g6`YT+qLw9k^ch|K'),tc | |
6ygIL8xI#LNz3v}T=4W "# #. .####:#######" lL27FZ0ij)7TQCI)P7u | |
}RT5-iJbbG5P-DHB<. " ##### # :############" R,YvZ_rnv6ky-G+4U' |
// curl -k https://localhost:8000/ | |
var https = require('https'); | |
var fs = require('fs'); | |
var options = { | |
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), | |
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') | |
}; | |
https.createServer(options, function (req, res) { |
IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.
This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].
Name | Size (KB) | License | Type | Unit Tests | Docs | Repository | Notes |
---|---|---|---|---|---|---|---|
Akihabara | 453 | GPL2, MIT | Classic Repro | no | API | github | Intended for making classic arcade-style games in JS+HTML5 |
AllBinary Platform | Platform Dependent | AllBinary | 2D/2.5D/3D | n |
require 'parslet' | |
require 'pp' | |
class HTTPParser < Parslet::Parser | |
# | |
# Character Classes | |
# | |
rule(:digit) { match('[0-9]') } | |
rule(:digits) { digit.repeat(1) } | |
rule(:xdigit) { digit | match('[a-fA-F]') } |
/* | |
* Function that handles the drawing of a circle using the triangle fan | |
* method. This will create a filled circle. | |
* | |
* Params: | |
* x (GLFloat) - the x position of the center point of the circle | |
* y (GLFloat) - the y position of the center point of the circle | |
* radius (GLFloat) - the radius that the painted circle will have | |
*/ | |
void drawFilledCircle(GLfloat x, GLfloat y, GLfloat radius){ |