This file contains hidden or 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
#!/usr/bin/env python3 | |
# get the amounts of each ingredient | |
lemon_juice_cups = float(input('Enter amount of lemon juice (in cups)')) | |
water_cups = float(input('Enter amount of water (in cups)')) | |
agave_nec_cups = float(input('Enter amount of agave nectar (in cups)')) | |
num_servings = float(input('How many servings does this make?')) | |
# print the amounts formatted to 2 decimal places | |
print('Lemonade ingredients - yields', '{:.2f}'.format(num_servings), 'servings') |
This file contains hidden or 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
#!/usr/bin/env bash | |
[ $[ $RANDOM % 6 ] = 0 ] && echo "BANG" || echo "Click" |
This file contains hidden or 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 | |
# | |
# dumps all URLs on a single page to a file | |
printf "%s\n" "Enter the url and press [ENTER] " | |
read -ep "url: " url | |
lynxopts=( -dump -listonly -nonumbers -notitle ); | |
lynx "${lynxopts[@]}" "$url" > linklist.txt |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am joshlawrence on github. | |
* I am hdb2 (https://keybase.io/hdb2) on keybase. | |
* I have a public key ASA0BSER26lbEQjKDLq2XGp_hWqtC2W7AoBva4Mk5HJT8Ao | |
To claim this, I am signing this object: |