This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"compress/gzip" | |
"io" | |
"net/http" | |
"strings" | |
) | |
type gzipResponseWriter struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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":[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAvqFAbVDF/1nOEXAit/eWmCsdtf79sQgyvfCA4d6JC0KZu5653K+R+da9GvYIRvWeuuBJA1u3cq7OHX0fm+J8tqp9Ffe9ZVKsj5ixpspbvSvwuaP8neJIS+hYzzGzqIdk+cqB+JSY71YF/yH/NMADX3loWtq7R3Xndc2k0CjnJHJmId8PSOTg7CMRS70GEVWq7Dc6E61M1ilCvBTaTv7f5KWkgZsOp4IIN4dui22t1aVLU87zFAw4Kqo7Y4cVMdfCEWYcIPgLVSqAsCOozeCObT1nyITN2Dm6dt06LlY8o2OpSa4cS/CoD57HMMB1xfMTaGAEW2Nv80wqf3TeYu/DoQ== rsa-key-20140208 |