I hereby claim:
- I am asiegman on github.
- I am asiegman (https://keybase.io/asiegman) on keybase.
- I have a public key ASDkCIbmSjFT9VBBrZNhbUPkIpz2E275ddgBqPeCgWDTdQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
words = [] | |
letters = ['a', 'r', 'v', 'b', 'i', 't', 'o'] | |
letters.sort() | |
# This is the correct path for OSX | |
f = open('/usr/share/dict/words') | |
print(f"letters: {letters}") |
#!/bin/bash | |
# Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" | |
# instead of the number and for the multiples of five print "Buzz". For numbers which are multiples | |
# of both three and five print "FizzBuzz". | |
for i in {1..100} ; do | |
num=$i | |
[[ $(( $i % 3 )) == 0 ]] && echo -n "Fizz" && num="" | |
[[ $(( $i % 5 )) == 0 ]] && echo -n "Buzz" && num="" |
# Output json-esque output for logstash to parse easily. | |
http { | |
# ... | |
log_format logstash_json '{"@timestamp": "$time_iso8601", ' | |
'"remote_addr": "$remote_addr", ' | |
'"remote_user": "$remote_user", ' | |
'"body_bytes_sent": "$body_bytes_sent", ' | |
'"request_time": "$request_time", ' |
#!/bin/bash | |
# | |
# SSH Exit Codes | |
# | |
# Using SSH in scripting is pretty standard, but sometimes you want to stop execution of a script | |
# if a command inside an SSH session fails to exit cleanly (return 0). The key to remember is that | |
# the ssh command's exit code will be that of the *last executed* command inside the ssh session, just | |
# like a bash script ends with the exit code of the last command executed unless you specifically | |
# call exit. | |
# |