Skip to content

Instantly share code, notes, and snippets.

@hughes
hughes / custom markdown
Created July 10, 2013 18:17
Markdown test files
video:
v[RXqSedWSu2k]
{question}[8]
{discussion}[795]
{demo}[797]
{schoolyourself}[1]
d3.select('.target_el')
.text('hello') // works, sets the text of .target_el to hello
.append('p') // appends <p> to <body> instead of .target_el
@hughes
hughes / kibana
Created August 20, 2013 20:39
/etc/init.d/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
#
@hughes
hughes / stats
Created August 20, 2013 20:49
stats server nginx conf
upstream stats_server {
server localhost:5601;
}
server {
listen 80;
server_name stats.dev.tophat.com;
@hughes
hughes / td-agent.conf
Created August 20, 2013 21:22
td-agent.conf
<source>
type syslog
port 42185
tag syslog
</source>
<source>
type forward
</source>
@hughes
hughes / regex
Created August 21, 2013 13:09
nginx log parser
^(?<remote_ip>[^ ]*) - - \[(?<datetime>[^\]]*)\] "(?<type>[^ ]*) (?<url>[^\ ]*) HTTP/1.1" (?<status>[0-9]*) (?<size>[0-9]*) "(?<referrer>[^"]*)" "(?<user_agent>[^"]*)"$
// 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.
{
"access" : {
"properties" : {
"body_bytes_sent" : {
"type" : "integer"
},
"protocol" : {
"type" : "string"
},
"request_method" : {
Space
space
SPACE
sPace
kevin spacey
interspace
spaces
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);
ლ(ಠ益ಠლ)