Skip to content

Instantly share code, notes, and snippets.

View icadariu's full-sized avatar

Ionut Cadariu icadariu

View GitHub Profile

Keybase proof

I hereby claim:

  • I am icadariu on github.
  • I am ionut (https://keybase.io/ionut) on keybase.
  • I have a public key whose fingerprint is D5CA 93B2 81C7 4457 DDC8 388D 5A54 8BD5 A24E AEB5

To claim this, I am signing this object:

@icadariu
icadariu / tmux.md
Created January 20, 2017 07:50 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

#!/bin/bash
hostname="consul-$(curl -s http://169.254.169.254/latest/meta-data/instance-id)"
CONF=/etc/consul/config/000-consul.json
TEMPLATE="/mnt/dashboard/consul-config/config.json"
x=0
rm -f $CONF
rm -f /tmp/instances $$ rm -f /tmp/*.json
restart consul

Keybase proof

I hereby claim:

  • I am icadariu on github.
  • I am ionut (https://keybase.io/ionut) on keybase.
  • I have a public key whose fingerprint is F358 47D1 E948 AB1E FD1E 6640 BF35 7E97 0C70 737C

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am icadariu on github.
* I am ionut (https://keybase.io/ionut) on keybase.
* I have a public key whose fingerprint is 1A7C CFAD 4926 2B2E EE5F B26A F16E B43D CFD1 22A0
To claim this, I am signing this object:
@icadariu
icadariu / gist:cbba97898113b1a0105ada09668dbce1
Created April 27, 2016 09:42 — forked from mbn18/gist:0d6ff5cb217c36419661
How to install nsenter on Ubuntu 14.04
# Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc.
# I preferred to keep the system clean and install nsenter in a container and then copy the command to the host
# Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter
# start a container
docker run --name nsenter -it ubuntu:14.04 bash
## in the docker
apt-get update
apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool
@icadariu
icadariu / IRC client in pure bash 4
Created March 29, 2016 07:47 — forked from anonymous/IRC client in pure bash 4
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Adrien Pujol - http://www.crashdump.fr/"
__copyright__ = "Copyright 2013, Adrien Pujol"
__license__ = "Mozilla Public License"
__version__ = "0.3"
__email__ = "adrien.pujol@crashdump.fr"
__status__ = "Development"
__doc__ = "Check a TLS certificate validity."