This is a sample, I hope.
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
``` | |
$ openssl version | |
OpenSSL 0.9.8zh 14 Jan 2016 | |
``` | |
``` | |
$ echo | openssl s_client -connect www.nyu.edu:443 -servername www.nyu.edu | |
CONNECTED(00000003) | |
--- | |
Certificate chain |
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
# Slightly more complicated than | |
# $ python -m SimpleHTTPServer 8000 | |
# Generate simple cert: | |
# $ openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# Run the server: | |
# $ python server.py | |
# In a browser: |
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
#!/bin/bash -x | |
### Uses curl, openssl, ImageMagick (convert, identify) | |
### Grab an image | |
URL=https://avatars0.githubusercontent.com/u/54688 | |
IMAGE=medina | |
curl -L $URL -o$IMAGE.png | |
### Extract the "raw" image |
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
import operator | |
print "\t".join([ "A", "B", "A and B", "A or B", "A xor B"]) | |
for a in [True, False]: | |
for b in [True, False]: | |
print "\t".join( | |
str(x) for x in [ | |
a, b, operator.iand(a,b), operator.ior(a,b), operator.ixor(a,b), | |
]) |
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
#!/bin/bash | |
if [ -z "$1" -o -z "$2" ] | |
then | |
echo "Usage: $0 infile outfile" | |
exit 1 | |
fi | |
convert "$1" \ | |
-morphology Convolve DoG:15,100,0 \ |
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
#!/bin/bash | |
# This hook is sourced after every virtualenv is activated. | |
if [[ ! -z ${TMUX} ]]; | |
then | |
venv=$(basename $VIRTUAL_ENV) | |
_TMUX_OLD_WINDOW=$(tmux display-message -p "#W") | |
tmux rename-window "$venv" | |
fi |
I hereby claim:
- I am medina on github.
- I am medina (https://keybase.io/medina) on keybase.
- I have a public key whose fingerprint is 95E1 4D7D 47BA AB88 65DC BD91 25A4 06FB 1196 F495
To claim this, I am signing this object: