Skip to content

Instantly share code, notes, and snippets.

@brainsik
brainsik / openssl-cli-notes.md
Last active Feb 19, 2017
OpenSSL client commands
View openssl-cli-notes.md

Connect to TLS endpoint w/SNI

echo | openssl s_client -connect $site:$port -servername $site

Show certificate expiration dates

echo | openssl s_client -connect $site:$port -servername $site 2>/dev/null | openssl x509 -noout -dates
@brainsik
brainsik / keybase.md
Created Sep 30, 2016
Keybase proof of GitHub identity
View keybase.md

Keybase proof

I hereby claim:

  • I am brainsik on github.
  • I am brainsik (https://keybase.io/brainsik) on keybase.
  • I have a public key whose fingerprint is 5D80 FC62 9CEF 8FAE 737C DDED 19A1 D142 4FE9 8E13

To claim this, I am signing this object:

@brainsik
brainsik / terraform.log
Last active Feb 24, 2016
Reproducing Terraform GH Issue #5290
View terraform.log
$ terraform plan
Refreshing Terraform state prior to plan...
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
@brainsik
brainsik / terraform.log
Last active Feb 23, 2016
Reproducing Terraform GH Issue #4488
View terraform.log
$ terraform plan
Refreshing Terraform state prior to plan...
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
View tls-notes.md
@brainsik
brainsik / get_me_loggin.py
Last active Dec 30, 2015
Quick logging config for Python shell
View get_me_loggin.py
import logging; logging.basicConfig(level=logging.DEBUG)
View Python.sublime-settings
{
"color_scheme": "Packages/User/Text Ex Machina bsik.tmTheme",
"translate_tabs_to_spaces": true,
"auto_complete_triggers": [{"selector": "source.python - string - comment - constant.numeric", "characters": "."}],
"complete_parameters": true,
"pep8_ignore": ["E501"]
}
@brainsik
brainsik / Preferences.sublime-settings
Last active May 24, 2017
SublimeText 3 Preferences
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_extra_bottom": 1,
"caret_extra_top": 1,
"caret_style": "solid",
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"create_window_at_startup": false,
"ensure_newline_at_eof_on_save": true,
@brainsik
brainsik / monocle_tx_redis_sub.py
Created Nov 14, 2013
Monocle Twisted Redis subscriber
View monocle_tx_redis_sub.py
# encoding: utf-8
import sys
import monocle
monocle.init("twisted")
from monocle import _o
from monocle.stack import eventloop
import txredis.client
from twisted.internet import reactor, protocol
@brainsik
brainsik / curlit.sh
Created Oct 31, 2013
Solves the "coding" challenge at letsrevolutionizetesting.com
View curlit.sh
x='http://letsrevolutionizetesting.com/challenge'; while :; do r=`curl -s -H "Accept: application/json" $x`; x=`echo $r | grep -E -o 'http[^"]+'`; if ! echo "$x" | grep -q http; then echo $r; break; fi; echo $x; done