Skip to content

Instantly share code, notes, and snippets.

@chrisn
chrisn / Preferences.sublime-settings
Created November 15, 2013 22:30
My Sublime Text 2 user settings
{
// Controls auto pairing of quotes, brackets etc
"auto_match_enabled": false,
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
// Set to true to ensure the last line of the file ends in a newline
// character when saving
"ensure_newline_at_eof_on_save": true,
@chrisn
chrisn / connect_pop3
Created November 2, 2013 23:09
Connect to POP3 server over SSL using openssl
openssl s_client -crlf -ign_eof -connect <pop3-server-address>:995
@chrisn
chrisn / curl_post_json
Created June 14, 2013 14:58
Post JSON data from a file to a url
curl <url> -H "Content-Type: application/json" --data @<filename>
@chrisn
chrisn / list_open_ports
Created June 12, 2013 15:22
List open ports
lsof -i -P
@chrisn
chrisn / hex_dump
Last active December 17, 2015 23:59
Dump a file as hexadecimal
od -t x1 -A x -v <filename>
@chrisn
chrisn / interfaces
Created October 8, 2012 11:34
Multicast network config
auto lo
iface lo inet loopback
# Added these lines:
up ifconfig lo multicast
up route add 232.0.0.1 dev lo
@chrisn
chrisn / prettify_json
Last active October 10, 2015 19:07
Prettify JSON
cat input.json | python -mjson.tool > output.json