Skip to content

Instantly share code, notes, and snippets.

View zol's full-sized avatar

Zoltan Olah zol

View GitHub Profile
@zol
zol / gist:16710210c9f7569a7050
Last active August 29, 2015 14:01
Tunnel remote port to localhost
ssh -L 9000:localhost:8983 ubuntu@host
# forwards remote port 8993 to local port of localhost:9000 as seen by host
@zol
zol / gist:2dadb04add98bc8c3219
Created June 25, 2014 18:30
Redirect all output and background command
some_cmd > some_file 2>&1 &
@zol
zol / gcontrol.sh
Last active August 29, 2015 14:06
Ground Control CLI
#!/usr/bin/env bash
#
# Ground Control CLI
# Copyright Percolate Studio 2014
if [ $# -gt 0 ]; then
ssh -t -x [email protected] gcontrol ${*:2}
else
echo "Ground Control CLI"
echo "Usage: gcontrol.sh <app> [command] [arguments]"
@zol
zol / mongo-setup.md
Last active January 22, 2016 22:20
Setting up mongodb with oplog tailing

Setting up replicaset

  • Log into mongodb1
  • Configure the replicaset (with a secondary and arbiter)
rs.initiate()
rs.add('ip-internal-ip-of-mongodb2')
rs.addArb('ip-internal-ip-of-mongodb3')