Skip to content

Instantly share code, notes, and snippets.

View blast-hardcheese's full-sized avatar

Devon Stewart blast-hardcheese

View GitHub Profile
#!/bin/sh
DOWNLOAD_DIR="$HOME/Downloads/weather"
REGION=txgulf
die() {
ec=$1
shift
echo $@ >&2
exit $ec
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
shorewall:
pkg:
- installed
cmd.wait:
- name: service shorewall reload
- require:
- pkg: shorewall
- pkg: ulogd
- file: shorewall_files
- file: /etc/default/shorewall
def countdown(a):
for i in a:
print a - i
if i == 3:
print "blast off!"
break
i+=1
countdown(3):