Skip to content

Instantly share code, notes, and snippets.

View openit's full-sized avatar

Rifqi Fitriady openit

View GitHub Profile
@openit
openit / readahead
Created September 21, 2016 16:23
readahead initscript
#!/bin/bash
#
# readahead set readhead for specific block devices
#
# chkconfig: 35 85 15
# description: set readhead for specific block devices
# processname:
#
### BEGIN INIT INFO
# Provides: readahead
@openit
openit / mongodbcheats.js
Created August 5, 2016 15:50 — forked from kgorman/mongodbcheats.js
MongoDB cheat sheet
/* MongoDB cheat sheet */
// replication lag via serverStatus()
db._adminCommand( { serverStatus : 1 , repl ; 2 } )
// stats
db.stats()
db.foo.stats()
// size of BSON of some query