This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#Rename the last screen dump on Mac | |
function sdname { | |
screen_dump_dir=$(defaults read com.apple.screencapture location); | |
filename="$( ls -rt $screen_dump_dir | tail -1 )"; | |
echo renaming $screen_dump_dir/$filename; | |
title="$@"; | |
while test -z "$title"; do echo "Give the dump a title (break to abort)"; read title; done; | |
mv "$screen_dump_dir/$filename" "$screen_dump_dir/$title-$filename"; | |
} |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/bin/bash | |
if [[ "$BASH_SOURCE" == "$0" ]]; then | |
ABSOLUTE_PATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`; | |
echo "This ($ABSOLUTE_PATH) is a source script, and should not be run directliy. Rather source the script by running: | |
source $ABSOLUTE_PATH; | |
p; | |
" | |
fi |
# Generate a new key | |
openssl genrsa -out server.key 2048 | |
# Generate a new CSR | |
openssl req -sha256 -new -key server.key -out server.csr | |
# Check certificate against CA | |
openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem | |
# Self Signed |