Skip to content

Instantly share code, notes, and snippets.

View shaggyrogers's full-sized avatar

shaggyrogers

  • Melbourne, Australia
View GitHub Profile
@rtomayko
rtomayko / ssh-persistent-control-master.md
Created June 7, 2017 19:43
10x SSH connection speedup w/ persistent control masters

SSH Persistent Control Master Config

Add to ~/.ssh/config:

Host *
  # Enable persistent connection multiplexing
  ControlMaster auto
  ControlPath ~/.ssh/-%r@%h:%p
 ControlPersist 600
@maxtruxa
maxtruxa / Makefile
Last active May 12, 2024 21:49
Generic makefile for C/C++ with automatic dependency generation, support for deep source file hierarchies and custom intermediate directories.
# output binary
BIN := test
# source files
SRCS := \
test.cpp
# files included in the tarball generated by 'make dist' (e.g. add LICENSE file)
DISTFILES := $(BIN)
@mhahl
mhahl / sysctl.conf
Created July 23, 2015 10:38
Router sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
@matlinuxer2
matlinuxer2 / gist:2925005
Created June 13, 2012 16:07
embed python into shell script as a pipe function
#!/usr/bin/env bash
function pipe_in_python() {
python -c "$(cat <<EOPY
import sys
for line in sys.stdin:
print line.replace( 'asdf', 'ASDF' ),
EOPY
)"