Skip to content

Instantly share code, notes, and snippets.

View ayn's full-sized avatar
🍉
wfh

Andrew Ng ayn

🍉
wfh
View GitHub Profile
@ayn
ayn / df.sh
Last active March 5, 2024 00:04 — forked from chockenberry/df.sh
df Replacement
#!/bin/sh
if [ ! -z "$*" ]; then
echo "this is ~/bin/df, use /bin/df"
exit 1
fi
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w`
nosuid=`mount | grep -v "read-only" | grep "nosuid" | sed -n 's/.*\(\/Volumes\/.*\) (.*/\1/p' | sed 's/[[:space:]]*$//' | sed 's/.*/"&"/'`
import logging
import zerigodns
import boto
from boto.route53.record import ResourceRecordSets
from boto.s3.website import RedirectLocation
# There is no API for these so we have to embed and lookup
# https://forums.aws.amazon.com/thread.jspa?threadID=116724
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region