Skip to content

Instantly share code, notes, and snippets.

View dragon3's full-sized avatar
🍺
🍺 🍻 🍺 🍻 🍺

Ryuzo Yamamoto dragon3

🍺
🍺 🍻 🍺 🍻 🍺
View GitHub Profile
@dragon3
dragon3 / gist:81b094859fa520a7b57b
Created September 24, 2014 08:04
docker-h2o-benchmark result - 2014/09/24
- Host: MacBook Air Mid 2013, CPU/1.7Ghz Intel Core i7, MEM: 8GB 1600MHz DDR3
- OS: OSX Mavericks 10.9.5
- VM: VirtualBox 4.3.16 r95972
```
benchmark: h2o
Running 30s test @ http://172.17.42.1:28080/
1 threads and 500 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 23.63ms 7.00ms 110.14ms 80.42%
[core]
pager = less
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
[user]
#!/bin/bash
# $Id: /mirror/codecheck.in/platform/linux/misc/backlog_svn_sync.sh 9698 2008-08-25T13:12:27.251994Z dragon3 $
#
# Script to svnsync "Backlog" project repository.
#
if [ $# -ne 2 ]; then
echo "Usage: $0 [space key] [project key]"
exit 1;
fi
var F = function() {
this.foo = function() { return "foo" };
}
var f = new F();
console.log(f.foo()); // foo
F.prototype.foo = function() { return "prototype.foo" };
function Deferred() { console.log(this); return (this instanceof Deferred) ? this.init() : new Deferred() }
Deferred.prototype = {
init: function() { console.log("init"); }
};
new Deferred();
Deferred();
//Object
p "HogeCamelCase".split('').each_with_index.map{ |i, index|
i.downcase! && index != 0 ? "_" + i : i
}.join('')
str = 'fooBar'
if ( (match = str[/^[A-Z]/]) != nil )
p match
end
;;
;; custom url-generator for typing-outputz.el
;;
(defun my-typing-outputz-url-generator ()
(typing-outputz-percent-encode
(replace-regexp-in-string
"c\\+\\+" "cpp"
(format "http://%s.localhost/"
(symbol-name major-mode)))))
(setq typing-outputz-url-generator-function 'my-typing-outputz-url-generator)
;;; pit.el --- Manipulate pit data.
;; Copyright (C) 2008 Takeru Naito
;; Author: Takeru Naito <takeru.naito@gmail.com>
;; Original: cho45 http://lowreal.rubyforge.org/pit/
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation; either version 2, or (at your
;; option) any later version.
/*
* TechTouch #0b10001
*
* kill parent
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>