Skip to content

Instantly share code, notes, and snippets.

### 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:
@joshlawrence
joshlawrence / dumpPageLinks.sh
Created October 29, 2018 23:40
Script to dump all URLs in a page
@joshlawrence
joshlawrence / roulette.sh
Created December 8, 2020 17:03
Russian Roulette in Bash
#!/usr/bin/env bash
[ $[ $RANDOM % 6 ] = 0 ] && echo "BANG" || echo "Click"
@joshlawrence
joshlawrence / ashley.py
Created June 14, 2021 19:52
Ashley's Homework
#!/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')