Skip to content

Instantly share code, notes, and snippets.

View BenLubar's full-sized avatar

Ben Lubar BenLubar

View GitHub Profile
@BenLubar
BenLubar / l4d2.json
Created May 10, 2013 04:07
L4D2 stats - first day
{
"Mechanic": {
"infected": {
"dual_pistols": 908,
"smg_silenced": 481,
"sniper_military": 666,
"smg": 209,
"pistol": 154,
"hunting_rifle": 296,
"autoshotgun": 257,
@BenLubar
BenLubar / gist:5588031
Created May 15, 2013 22:44
logs$ grep -ni auth *
L127_000_001_001_27015_201305090909_001.log:456:L 05/09/2013 - 09:17:06: STEAMAUTH: Client Nightgunner5 😻 KritzKast.com received failure code 6
L127_000_001_001_27015_201305100420_001.log:69:L 05/10/2013 - 04:21:30: STEAMAUTH: Client MaiNuhtz received failure code 6
L127_000_001_001_27015_201305102116_001.log:4:L 05/10/2013 - 21:17:02: STEAMAUTH: Client erodriguez received failure code 6
L127_000_001_001_27015_201305110649_001.log:44:L 05/11/2013 - 06:51:04: STEAMAUTH: Client [ F.T.G] Louna received failure code 6
L127_000_001_001_27015_201305110934_001.log:791:L 05/11/2013 - 09:43:54: STEAMAUTH: Client lululaglue received failure code 6
L127_000_001_001_27015_201305110944_001.log:781:L 05/11/2013 - 09:53:09: STEAMAUTH: Client lululaglue received failure code 6
L127_000_001_001_27015_201305110959_001.log:51:L 05/11/2013 - 09:59:40: STEAMAUTH: Client STS received failure code 6
L127_000_001_001_27015_201305111717_001.log:43:L 05/11/2013 - 17:17:58: STEAMAUTH: Client IceColdX received failure code 6
L127_000_00
function (doc, meta) {
if (doc.Type == 'killed') {
emit(dateToArray(doc.Time), {Attacker: doc.Attacker.Class, Victim: doc.Victim.Class, Weapon: doc.Weapon});
}
}
@BenLubar
BenLubar / cbfs.log
Created May 21, 2013 02:24
cbfs command was `cbfs -bucket cbfs -couchbase http://localhost:8091/ -nodeID loads -root /mnt/you_ess_bee_one/cbfs` Server crashed while running `cbfsclient http://localhost:8484/ upload $GOPATH/src/github.com/couchbaselabs/cbfs/monitor monitor`
2013/05/20 21:20:55 Connecting to couchbase bucket cbfs at http://localhost:8091/
2013/05/20 21:20:56 Listening to web requests on :8484 as server loads
2013/05/20 21:20:56 Error removing loads's task list: MCResponse status=KEY_ENOENT, opcode=DELETE, opaque=0, msg: Not found
2013/05/20 21:21:07 Error getting file "index.html": MCResponse status=KEY_ENOENT, opcode=GET, opaque=0, msg: Not found
2013/05/20 21:21:08 Error getting file "favicon.ico": MCResponse status=KEY_ENOENT, opcode=GET, opaque=0, msg: Not found
2013/05/20 21:21:12 Going to fetch 6 startup objects
2013/05/20 21:21:12 Don't have hash file: 6111a248f806674cd844779cb8304a44f10f90b7 and no remote nodes could help
panic: runtime error: assignment to entry in nil map
goroutine 25 [running]:
@BenLubar
BenLubar / cbfs-stress.go
Last active December 17, 2015 15:29
Continuously updates a file with the current timestamp. Deletes it and exits on ^C or after one million iterations.
package main
import (
"io"
"io/ioutil"
"log"
"net/http"
"os"
"os/signal"
"runtime/pprof"
@BenLubar
BenLubar / cbfs-iPad.json
Created May 24, 2013 20:08
No ctype? Uh oh.
{"files":{"image.jpg":{"ctype":"","headers":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-us"],"Connection":["keep-alive"],"Content-Length":["95196"],"Origin":["http://192.168.1.79:8484"],"Referer":["http://192.168.1.79:8484/cbfs-admin/"],"User-Agent":["Mozilla/5.0 (iPad; CPU OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25"]},"length":95196,"modified":"2013-05-24T20:02:53.490954918Z","oid":"60d6b4f4533f58d2f4a1ca36141b60ef6ba8390d","revno":0,"type":"file"}},"dirs":{},"path":"/iPad Photos/image.jpg"}
{"Type":"post","ID":1,"Thread":1,"Modified":{"Count":1,"Last":"2013-05-26T02:35:22.422030759Z"},"Created":"2013-05-26T02:35:22.422030759Z","Addr":"[::1]:44608","Title":"Test","Content":"\u003cem\u003etest\u003c/em\u003e"}
panic: runtime error: index out of range
goroutine 95 [running]:
code.google.com/p/go.exp/locale/collate.(*iter).next(0xc2001508d0, 0x47d001)
/home/ben/go/src/code.google.com/p/go.exp/locale/collate/collate.go:368 +0x5da
code.google.com/p/go.exp/locale/collate.(*iter).nextPrimary(0xc2001508d0, 0x1771)
/home/ben/go/src/code.google.com/p/go.exp/locale/collate/collate.go:440 +0x198
code.google.com/p/go.exp/locale/collate.compareLevel(0xa4c800, 0xc200150060, 0xc2001508d0, 0x200)
/home/ben/go/src/code.google.com/p/go.exp/locale/collate/collate.go:203 +0xa1
code.google.com/p/go.exp/locale/collate.(*Collator).compare(0xc200150000, 0xc2003a2af8)
2013/05/26 14:47:52 setting up github.com/BenLubar/cbgb [-data ./data -addr :21210 -rest-couch :18092 -rest-ns :18091 -v]
2013/05/26 14:47:58 [cbgb -data ./data -addr :21210 -rest-couch :18092 -rest-ns :18091 -v]
2013/05/26 14:47:59 cbgb - version 0.0.0
2013/05/26 14:47:59 -------------------------------------------------------
2013/05/26 14:47:59 warning: running openly without any adminUser/adminPass
2013/05/26 14:47:59 warning: please don't run this way in production usage
2013/05/26 14:47:59 -------------------------------------------------------
2013/05/26 14:47:59 loading buckets from: ./data
2013/05/26 14:47:59 loading bucket: default
2013/05/26 14:47:59 loading bucket: cbfs
ben@loads cbstress$ ./cbstress
Usage: ./cbstress [options] http://localhost:8091/
Options:
-b="default": bucket name
-c=10000: maximum document count
-d=5m0s: duration of the stress test
-p="default": pool name
-w=1: worker count - defaults to GOMAXPROCS
ben@loads cbstress$ ./cbstress -d 2m30s -w 16 http://localhost:18091/