Skip to content

Instantly share code, notes, and snippets.

View jestan's full-sized avatar

Jestan Nirojan jestan

View GitHub Profile
@jestan
jestan / gist:6172705
Last active December 20, 2015 17:59
JSW Profiling with JProfiler
wrapper.disable_restarts=TRUE
wrapper.java.additional.1=-agentpath:/home/nirojan/programs/JProfiler/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849,nowait
wrapper.java.additional.1.stripquotes=TRUE
@jestan
jestan / scala maven plugin crash
Created January 29, 2013 05:14
scala maven plugin 3.1.0 intermittent crashes
[INFO]
[INFO] --- scala-maven-plugin:3.1.0:compile (default) @ appstore ---
[INFO] /home/jestan/development/scala-vaadin/src/main/java:-1: info: compiling
[INFO] /home/jestan/development/scala-vaadin/src/main/scala:-1: info: compiling
[INFO] Compiling 12 source files to /home/nirojan/development/appstore-web/appstore/target/classes at 1359435193728
[ERROR] error:
[INFO] while compiling: /home/jestan/development/scala-vaadin/src/main/scala/web/filters/MongoConnectionFilter.scala
[INFO] during phase: jvm
[INFO] library version: version 2.10.0
[INFO] compiler version: version 2.10.0
@jestan
jestan / gist:4411538
Last active September 25, 2023 19:58
MAP Protocol Error Codes

MAP Protocol Error Codes

Generic errors

34 System failure

35 Data Missing

36 Unexpected Data Value

21 Facility Not Supported

@jestan
jestan / gist:4233472
Created December 7, 2012 14:07
Mongo DB Crash
Fri Dec 7 19:17:56 Backtrace:
0xaf8c41 0x5586c9 0x7f6cb4e094c0 0x7f6cb4e09445 0x7f6cb4e0cbab 0xb45dbb 0xb4414c 0xb443bb 0xb449cb 0xb56f6a 0xb57265 0xb5727e 0x7f6cb5bafc83 0x7f6cb5bafea8 0x7f6cb4ec54bd
mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaf8c41]
mongod(_ZN5mongo10abruptQuitEi+0x399) [0x5586c9]
/lib/x86_64-linux-gnu/libc.so.6(+0x364c0) [0x7f6cb4e094c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f6cb4e09445]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f6cb4e0cbab]
mongod(_ZN8tcmalloc3LogENS_7LogModeEPKciNS_7LogItemES3_S3_S3_+0x20b) [0xb45dbb]
mongod(_ZN8tcmalloc15CentralFreeList14ReleaseToSpansEPv+0x12c) [0xb4414c]
mongod(_ZN8tcmalloc15CentralFreeList18ReleaseListToSpansEPv+0x1b) [0xb443bb]
@jestan
jestan / gist:4224839
Created December 6, 2012 14:33
Mongo DB Repair
Mongo DB Repair
1) Remove mongod.pid file or mongod.lock file
2) Run './mongod --repair --dbpath <db-path>'
3) Run './mongo'
//From Mongo Shell
@jestan
jestan / gist:4167214
Created November 29, 2012 06:42
Filter Exceptions with Stack Traces
grep -A 20 "Exception" error.log > exceptions.log
@jestan
jestan / gist:4163018
Created November 28, 2012 18:19
Simple disk benchmark
dd bs=1M count=128 if=/dev/zero of=/tmp/test
dd bs=1M count=128 if=/dev/zero of=/tmp/test; sync
dd bs=1M count=128 if=/dev/zero of=/tmp/test conv=fdatasync
dd bs=1M count=128 if=/dev/zero of=/tmp/test oflag=dsync
iozone -R -l 5 -u 5 -r 4k -s 100m -F /tmp/f1 /tmp/f2 /tmp/f3 /tmp/f4 /tmp/f5 | tee -a /tmp/iozone_results.txt
@jestan
jestan / gist:4147360
Created November 26, 2012 09:24
Maven Release
mvn release:clean release:prepare -DautoVersionSubmodules=true
@jestan
jestan / gist:3884165
Created October 13, 2012 11:04
Simple Dead HTTP Server!!!
#!/bin/bash
while true;
do {
echo -e "HTTP/1.1 200 OK\r\n"; cat www-doc/index.html;
} | nc -l 8080;
done
@jestan
jestan / gist:3692077
Created September 10, 2012 16:51 — forked from mtnygard/gist:2254147
Books I recommended today