Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gist:8892782
Created February 9, 2014 01:17
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAvqFAbVDF/1nOEXAit/eWmCsdtf79sQgyvfCA4d6JC0KZu5653K+R+da9GvYIRvWeuuBJA1u3cq7OHX0fm+J8tqp9Ffe9ZVKsj5ixpspbvSvwuaP8neJIS+hYzzGzqIdk+cqB+JSY71YF/yH/NMADX3loWtq7R3Xndc2k0CjnJHJmId8PSOTg7CMRS70GEVWq7Dc6E61M1ilCvBTaTv7f5KWkgZsOp4IIN4dui22t1aVLU87zFAw4Kqo7Y4cVMdfCEWYcIPgLVSqAsCOozeCObT1nyITN2Dm6dt06LlY8o2OpSa4cS/CoD57HMMB1xfMTaGAEW2Nv80wqf3TeYu/DoQ== rsa-key-20140208
@stympy
stympy / error.json
Created October 3, 2012 12:56
Sample Honeybadger error payload
{
"notifier":{
"name":"Honeybadger Notifier",
"url":"https://github.com/honeybadger-io/honeybadger-ruby",
"version":"1.3.0"
},
"error":{
"class":"RuntimeError",
"message":"RuntimeError: This is a runtime error, generated by the crywolf app at 2012-09-26 17:25:24 -0700",
"backtrace":[
/*
# Use cases:
1. Efficiently ignore all data coming from a stdio stream (ie, >/dev/null)
2. Interact with stdio data in a JS Stream object
3. Inherit stdio streams from the parent process
4. Connect arbitrary handle to a stdio stream
5. Connect an arbitrary handle to a child stdio stream other than 0,1,2
@the42
the42 / gist:1956518
Created March 2, 2012 07:34
GZip encoding for GO V1 using custom responsewriter
package main
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
type gzipResponseWriter struct {
@felixge
felixge / command.sh
Created October 29, 2011 13:43
Bash stuff for fighting a weak DOS attack
# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference.
# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2
# Step 0: Check what is going on at port 80
$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c
# Step 1: Increase the number of available fds
$ ulimit -n 32000
# Step 2: Restart your webserver, for me:
@Marak
Marak / gist:1128904
Created August 6, 2011 01:47
Rules of the Obsessive-Compulsive Sociopath
Rules of the Obsessive-Compulsive Sociopath
If anything can go wrong, FIX IT!
When given a choice, take both!
Multiple projects lead to multiple successes.
Start at the top and work your way up.
Do it by the Book — but be the author!
When forced to compromise, ask for more.
If you can’t beat them, join them, then beat them.
If it’s worth doing, it’s got to be done RIGHT NOW.