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/sh | |
DOWNLOAD_DIR="$HOME/Downloads/weather" | |
REGION=txgulf | |
die() { | |
ec=$1 | |
shift | |
echo $@ >&2 | |
exit $ec |
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
recurse_image_resize() { | |
for f in "$@"; do | |
if [ ! -d "$f" ]; then | |
echo "recurse_image_resize: '$f' is not a directory" | |
fi | |
for ff in "$f"/*.png; do | |
echo "resizing $ff to half size" | |
convert "$ff" -resize 50% "$ff"; | |
done |
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
shorewall: | |
pkg: | |
- installed | |
cmd.wait: | |
- name: service shorewall reload | |
- require: | |
- pkg: shorewall | |
- pkg: ulogd | |
- file: shorewall_files | |
- file: /etc/default/shorewall |
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
def countdown(a): | |
for i in a: | |
print a - i | |
if i == 3: | |
print "blast off!" | |
break | |
i+=1 | |
countdown(3): |