Skip to content

Instantly share code, notes, and snippets.

View acedrew's full-sized avatar

Andrew Rodgers acedrew

View GitHub Profile
@acedrew
acedrew / tmux.md
Last active August 29, 2015 14:02 — forked from andreyvit/tmux.md

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

@acedrew
acedrew / jsontodotnotes
Created June 8, 2014 23:02
Parse a hierarchical json document back into java properties file dot notation
from collections import Mapping, Set, Sequence
# dual python 2/3 compatability, inspired by the "six" library
string_types = (str, unicode) if str is bytes else (str, bytes)
iteritems = lambda mapping: getattr(mapping, 'iteritems', mapping.items)()
def objwalk(obj, path=(), memo=None):
if memo is None:
memo = set()
iterator = None
/*/#Sample Flat Config Data
dhcpd.status=enabled
dhcpd.1.status=enabled
dhcpd.1.start=192.168.2.100
dhcpd.1.redirect=192.168.2.20
dhcpd.1.netmask=255.255.255.0
dhcpd.1.lease_time=3600
dhcpd.1.end=192.168.2.200
dhcpd.1.dnsproxy=enabled
dhcpd.1.dns.2.status=disabled
@acedrew
acedrew / wfhw
Last active December 15, 2015 17:59
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking www.workfromhomewisdom.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
@acedrew
acedrew / skadicomic speed test
Created April 2, 2013 21:50
Site speed comparison.
Before:
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking skadicomic.com (be patient).....done
Server Software: Apache