Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Plugin to monitor HTTP response ( httping )
# MIT Licence
# Sept 9, 2012 Masahito Zembutsu <[email protected]>
#%# family=auto
#%# capabilities=autoconf
. $MUNIN_LIBDIR/plugins/plugin.sh
#!/bin/bash
# Reads the player position via telnet and writes it to tracks.csv. Can be
# sourced or executed.
# The tracks.csv file can be display in the map viewer https://github.com/nicolas-f/7DTD-leaflet/
. /usr/local/lib/7dtd/common.sh
# @@ this should be a per instance config, not per server
SDTD_TRACKS_PATH=/path/to/tracks.csv
@oberhamsi
oberhamsi / index.js
Created March 12, 2014 11:45
requirebin sketch
var gamejs = require('gamejs');
var SCREEN_WIDTH = 400;
var SCREEN_HEIGHT = 400;
// ball is a colored circle.
// ball can circle through color list.
// ball constantly pulsates in size.
function Ball(center) {
this.center = center;
@oberhamsi
oberhamsi / index.js
Created July 21, 2013 11:18
requirebin sketch
/**
* @fileoverview
* Draw lines, polygons, circles, etc on the screen.
* Render text in a certain font to the screen.
*/
var gamejs = require('gamejs');
var draw = require('gamejs/draw');
var font = require('gamejs/font');
function main() {
@oberhamsi
oberhamsi / index.js
Created July 21, 2013 11:18
requirebin sketch
/**
* @fileoverview
* Draw lines, polygons, circles, etc on the screen.
* Render text in a certain font to the screen.
*/
var gamejs = require('gamejs');
var draw = require('gamejs/draw');
var font = require('gamejs/font');
function main() {
@oberhamsi
oberhamsi / ringojs-0.9.1.iss
Last active December 19, 2015 23:59
ringojs inno setup script
[Setup]
AppName=RingoJs
AppVersion=0.9.1
DefaultDirName={pf}\ringojs-0.9
DefaultGroupName=ORF ON
Compression=lzma2
SolidCompression=yes
[Files]
Source: "ringojs-0.9\*"; DestDir: "{app}"; Flags: createallsubdirs recursesubdirs
@oberhamsi
oberhamsi / uid.js
Created July 11, 2013 16:56
imagesrv adition DOT com/js/acb/uid.html
var key ='ad_uid';
var IdWs = new function () {
function g(c, a) {
var b;
void 0 !== a && document.getElementById(a) ? b = document.getElementById(a) : (b = document.createElement(c), b.id = a);
b.style.visibility = "hidden";
b.style.position = "absolute";
document.body.appendChild(b);
return b
@oberhamsi
oberhamsi / fragleak.js
Created June 25, 2013 09:28
ie8 fragment leak
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
var LONG_TEXT = "Die EU-Außenminister haben sich grundsätzlich zur Fortsetzung der Beitrittsverhandlungen mit der Türkei geeinigt. Nach Angaben von Diplomaten gaben sie in Luxemburg grünes Licht zur Eröffnung des Kapitels zur Regionalpolitik. Die offizielle Beitrittsrunde soll aber erst im Herbst nach dem Fortschrittsbericht der EU-Kommission und nach neuerlichen Beratungen der Außenminister stattfinden, wie die irische EU-Ratspräsidentschaft mitteilte.Die EU-Außenminister haben sich grundsätzlich zur Fortsetzung der Beitrittsverhandlungen mit der Türkei geeinigt. Nach Angaben von Diplomaten gaben sie in Luxemburg grünes Licht zur Eröffnung des Kapitels zur Regionalpolitik. Die offizielle Beitrittsrunde soll aber erst im Herbst nach dem Fortschrittsbericht der EU-Kommission und nach neuerlichen Beratungen der Außenminister stattfinden, wie die irische EU-Ratspräsidentschaft mitteilte.Die EU-Außenminister haben sich grundsätzlich zu
@oberhamsi
oberhamsi / gist:5712588
Created June 5, 2013 08:55
shutdown hook deadlock
2013-06-05 10:47:40
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode):
"ringo-worker-1" daemon prio=10 tid=0x00007fb698003800 nid=0x77e7 waiting on condition [0x00007fb6cb227000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000ec3cc6a0> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)

Oberhamsi's RingoJs benchmark

RingoJs comes with a HTTP Server and basic utilities to deal with JSGI. Unless you are building something very specific, you will want to use packages to ease web development. With this benchmark I try to shed some light on how much those (beta quality) packages for web development degrade RingoJs' performance. The benchmark tasks defined by this benchmark are simple but can give us an upper limit for the performance achievable in real world projects.

I am using the TechEmpower FrameworkBenchmarks. This benchmark tests web development frameworks by running multiple, standardized tasks at varying concurrency levels. The four tasks are outlined in more detail in the results section.

Ringo and friends

I benchmarked Ringo twice to see how a pure JSGI application, written just with the Ringo standard library, performs compared to an application utilizing all the libraries we recommend for convenient web development. Those