Skip to content

Instantly share code, notes, and snippets.

View acedrew's full-sized avatar

Andrew Rodgers acedrew

View GitHub Profile
@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
@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
/*/#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 / 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
@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

### My patterns
MYSYSLOGBASE %{SYSLOGTIMESTAMP:timestamp} %{WORD:logsource_host} %{SYSLOGHOST:logsource} %{SYSLOGPROG}: %{GREEDYDATA:syslog_message}
MYSYSLOGNGINX <%{NUMBER:syslog_pri}>%{MYSYSLOGBASE}
###Logstash.conf
input {
syslog {
type => syslog

Keybase proof

I hereby claim:

  • I am acedrew on github.
  • I am acedrew (https://keybase.io/acedrew) on keybase.
  • I have a public key whose fingerprint is 0B5D 5F42 C268 D35A 5ECF D586 E74F A11E AE1B C60F

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am acedrew on github.
  • I am acedrew (https://keybase.io/acedrew) on keybase.
  • I have a public key whose fingerprint is 1690 57D0 2B52 E1D8 B149 8A64 3AA9 C552 1AD1 C54C

To claim this, I am signing this object:

{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": 1,
"links": [],
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html