Skip to content

Instantly share code, notes, and snippets.

@tlongren
tlongren / backup-mysql.sh
Last active February 7, 2017 13:48
Backup and Compress All Databases On Your MySQL Server
#!/bin/sh
rightnow=`date +%Y-%m-%d_%H-%M-%S`
/usr/bin/mysqldump -uroot -pyourpasswordfornoprompt --opt --all-databases --single-transaction | bzip2 -cq9 > /home/tyler/mysql-backups/full-$rightnow.sql.bz2
@nikcub
nikcub / chrome.refresh.sh
Created October 31, 2011 03:05
Chrome Refresh
#!/bin/bash
# Chrome Refresh
#
# nik cubrilovic - nikcub.appspot.com
#
# Simple applescript browser reloader for Google Chrome. It will either open a
# new tab with the url passed in as an argument or refresh an existing tab.
#
# Link this up with watchr to auto-refresh browser windows when you save files