Skip to content

Instantly share code, notes, and snippets.

Chuck Houpt chuckhoupt

Block or report user

Report or block chuckhoupt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chuckhoupt
chuckhoupt / mailpage.sh
Last active Aug 29, 2015
Bash shell script to mail a copy of a web page's HTML so it will render correctly in most native email programs (but not in web-mail).
View mailpage.sh
#!/bin/bash
# Examples:
#
# mailpage.sh http://example.com chuck@habilis.net 'An Example Page'
# mailpage.sh http://example.com chuck@habilis.net 'Passworded Page' --user=john --password=xxxxx
set -eu
USAGE=$'\n'"Usage: $(basename $0) URL address subject [ wget options ]"
@chuckhoupt
chuckhoupt / archive_logs
Last active Jan 4, 2016
A shell script to archive web logs on DreamHost.
View archive_logs
#!/bin/bash
# DreamHost Web Log Archiver
#
# DreamHost only stores web logs for a few days (configurable 3-30 days),
# so to maintain long term logs, an archive copy must be maintained.
#
# This script copies new gzipped http/https log files from logs/ to
# logs_archive/
#
@chuckhoupt
chuckhoupt / Backup-Recent.sh
Last active Dec 21, 2015
A shell script to backup a user's recently modified files to a remote server via rsync.
View Backup-Recent.sh
#!/bin/bash
set -eux
BACKUP_ACCOUNT=backupuser@backup.example.com
MAXSIZE=45000000000
# Wait for the net to come up
while [ ! $(ifconfig | grep 'status: active') ]; do
You can’t perform that action at this time.