Skip to content

Instantly share code, notes, and snippets.

View gravityblast's full-sized avatar
🌵

Andrea Franz gravityblast

🌵
View GitHub Profile

I hereby claim:

To claim this, I am signing this object:

{
@gravityblast
gravityblast / with forked package
Created September 7, 2016 16:49
benchmarking logentries package fork
🌻 ➜ phoenix(master): ab -n 1000 -c 100 -l http://127.0.0.1:4000/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
package main
import "github.com/pilu/traffic"
func root(w traffic.ResponseWriter, r *traffic.Request) {
user := map[string]string{
"name": "foo",
}
w.WriteJSON(user)
}
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
class StyleRule
constructor: ->
@styleNode = @_buildStyleNode()
@style = @styleNode[if @styleNode.sheet then 'sheet' else 'styleSheet']
@cssRulesProperty = if @style.rules then "rules" else "cssRules"
@removeMethodName = if @style.removeRule then "removeRule" else "deleteRule"
@insertRuleMethod = if @style.insertRule then @_insertRule else @_addRule
_buildStyleNode: ->
styleNode = document.createElement "style"