This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qs = require 'querystring' | |
request = require 'request' | |
cradle = require 'cradle' | |
http = require 'http' | |
client = new cradle.Connection | |
db = client.database 'bus-realtime' | |
url = "http://www.straeto.is/bitar/bus/livemap/json.jsp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
jsdom = require 'jsdom' | |
{ zip } = require 'underscore' | |
jquery = fs.readFileSync 'lib/jquery-1.7.2.min.js' | |
story = ($, [title, subtext]) -> | |
$t = (selector) -> $ selector, title | |
$s = (selector) -> $ selector, subtext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"route": 15, | |
"times": ["12:24","12:54","13:24","13:54","14:24","14:54","15:24","15:54","16:24","16:54","17:24","17:54","18:24","18:54","19:24","19:54","20:24","20:54","21:24","21:54","22:24","22:54","23:24"], | |
"source":"estimated", | |
"endStop":{"location":[64.1471469996301,-21.9633719999683],"stopId":"90000116","longName":"Meistaravellir","shortName":"Meistaravellir"}, | |
"stop":{"location":[64.1693779999662,-21.7151469991191],"stopId":"16040637","longName":"Álfatangi / Arnartangi","shortName":"Arnartangi"} | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
watch: { | |
latex: { | |
files: ['**/*.tex'], | |
tasks: ['exec:xelatex'] | |
} | |
}, | |
exec: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
"io/ioutil" | |
_ "github.com/lib/pq" | |
_ "database/sql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
09:04:03.920861 IP 10.0.0.134 > 10.0.1.202: VRRPv2, Advertisement, vrid 10, prio 101, authtype simple, intvl 1s, length 16 | |
09:04:04.922004 IP 10.0.0.134 > 10.0.1.202: VRRPv2, Advertisement, vrid 10, prio 101, authtype simple, intvl 1s, length 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "io/ioutil" | |
import "net/http" | |
import "encoding/json" | |
type CurrencyResult struct { | |
Currencies []Currency `json:"results"` | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ran this on my 2014 MBA 13" 1.7 GHz i7, 8GB Ram. | |
$ go version | |
go version go1.2.1 darwin/amd64 | |
$ go build go-web.go | |
$ GOMAXPROCS=4 ./go-web & | |
$ wrk -t10 -c400 http://localhost:8080 | |
Running 10s test @ http://localhost:8080 | |
10 threads and 400 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 4.72ms 1.33ms 47.42ms 95.49% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print u'Congratulations Master Jóhann' |