
Want to lowercase an entire section in VIM?
Use: gu<movement>
So, from cursor to end of line: gu$
From cursor to begining of line: gu^
For uppercase, same thing, just: gU<movement>
Want to find the last time a database was updated?
SELECT MAX(UPDATE_TIME), TABLE_SCHEMA as last_update from information_schema.tables GROUP BY TABLE_SCHEMA;
Just a snippet to keep handy for livereload.
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
For reference, here’s a quick MySQL and gzip one-line terminal command, useful for a scheduled backup
/usr/bin/mysqldump --opt -u <username> -p<password> <DATABASE> | gzip -9 > /data/backup/sql_backup_`date +'%Y%m%d%H%M'`.sql.gz
Notes:
gzip -9
is maximum compressiondate
is in the ‘201801011355’ format (where current date is January 1st 2018 at 1:55pm)