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
npm ERR! code EJSONPARSE | |
npm ERR! JSON.parse Failed to parse json | |
npm ERR! JSON.parse Unexpected token… |
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
### Keybase proof | |
I hereby claim: | |
* I am redslug on github. | |
* I am bdettmer (https://keybase.io/bdettmer) on keybase. | |
* I have a public key ASCp6fBbSlLQuPSi9pc9eLH2M3nlaPhD3OkRTyEMJUif7Qo | |
To claim this, I am signing this object: |
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
------------------------------- MODULE fun ------------------------------- | |
EXTENDS Naturals, TLC | |
(* --algorithm transfer | |
variables alice_account = 10, bob_account = 10, account_total = alice_account + bob_account, is_transferring = FALSE; | |
process Transfer \in 1..2 | |
variable money \in 1..20; | |
begin |
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
(* --algorithm transfer | |
variables alice_account = 10, bob_account = 10, account_total = alice_account + bob_account, is_transferring = FALSE; | |
process Transfer \in 1..2 | |
variable money \in 1..20; | |
begin | |
Transfer: | |
if is_transferring = FALSE then | |
Lock: is_transferring := TRUE; |
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
------------------------------- MODULE hello ------------------------------- | |
EXTENDS Naturals, TLC | |
(* --algorithm transfer | |
variables alice_account = 10, bob_account = 10, account_total = alice_account + bob_account, is_transferring = FALSE; | |
process Transfer \in 1..2 | |
variable money \in 1..20; | |
begin |
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 | |
pushd /home/pi/weather | |
source ~/.SECRET | |
source venv/bin/activate | |
python get_weather.py $DARK_SKI_API_KEY | |
date >> log | |
popd |
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
DARK_SKI_API_KEY=blah |
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
summary = '{}-{}F '.format(int(tempLow), int(tempHigh)) + summary | |
font_size_in_points = 9 | |
font = ImageFont.truetype('fonts/led.ttf', font_size_in_points) | |
font_size = font.getsize(summary) | |
print('summary: {}, font size: {}'.format(summary, font_size)) | |
summary_img = Image.new('RGB', font_size) | |
draw = ImageDraw.Draw(summary_img) | |
draw.text((0, 0), summary, font=font) |
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 | |
cleanup() { | |
echo "Cleaning stuff up" >> log | |
sudo pkill demo | |
popd | |
exit | |
} | |
pushd /home/pi/weather |
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
*/2 * * * * /home/pi/weather/get_weather.sh >> ~/weather/log | |
@reboot /home/pi/weather/show_weather.sh >> ~/weather/log |
NewerOlder