Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Hughes hughes

View GitHub Profile
View gist:8059530
127.0.0.1 localhost
127.0.1.1 thmdev
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 dev.tophatmonocle.com sentry.dev.tophatmonocle.com
View gist:7491002
a=eval;b=decodeURIComponent;c='%E0%B2%A0%E7%9B%8A%E0%B2%A0%E1%83%9A';d='%E1%83%9A'
e='var '+b(d)+'=alert;var '+b(c)+'="'+b(d)+'('+b(c)+')"';a(e);
ლ(ಠ益ಠლ)
View gist:7372034
Space
space
SPACE
sPace
kevin spacey
interspace
spaces
View _mapping.json
{
"access" : {
"properties" : {
"body_bytes_sent" : {
"type" : "integer"
},
"protocol" : {
"type" : "string"
},
"request_method" : {
View basic_controller.txt
// setup
SET offset TO ALT:RADAR.
SET alt_target TO 25.
SET max_throttle TO 0.5.
SAS ON.
LOG "MISSION START" TO output.
UNTIL 0 {
// setup
SET alt_radar TO ALT:RADAR - offset.
View pre-commit
#!/bin/bash
if [ -n $VIRTUAL_ENV ]; then
PATH=$VIRTUAL_ENV/bin:$PATH
fi
REPO=$(pwd)
EXIT_CODE=0
for FILE in `git diff-index --name-only --cached HEAD -- | egrep .js$`; do
@hughes
hughes / regex
Created Aug 21, 2013
nginx log parser
View regex
^(?<remote_ip>[^ ]*) - - \[(?<datetime>[^\]]*)\] "(?<type>[^ ]*) (?<url>[^\ ]*) HTTP/1.1" (?<status>[0-9]*) (?<size>[0-9]*) "(?<referrer>[^"]*)" "(?<user_agent>[^"]*)"$
View td-agent.conf
<source>
type syslog
port 42185
tag syslog
</source>
<source>
type forward
</source>
@hughes
hughes / stats
Created Aug 20, 2013
stats server nginx conf
View stats
upstream stats_server {
server localhost:5601;
}
server {
listen 80;
server_name stats.dev.tophat.com;
@hughes
hughes / kibana
Created Aug 20, 2013
/etc/init.d/kibana
View kibana
#!/bin/sh
#
# chkconfig: 2345 70 40
# description: kibana startup script
# author: Matt Reid
# websites: http://themattreid.com
# license: GPL v2
# date: 2012-12-06
# version: 0000.1
#