986Displaying Text Data in a New Window

Problem: Data is stored in an array, you can not reload the page, you need to export it from the JS console.

Solution:

Create a New Window

var w = window.open()

Add a basic HTML header

w.document.writeln("<html><body><pre>")

Add your data

Assuming your data lives in an array called data, and has a sub-array with 2 values.

data.forEach(d => { w.document.writeln(d[0] + ", " + d[1])  })

Add a CSV Header

w.document.writeln("timestamp, temp")

Clear

w.document.body.innerHTML = "";

980Dumping all Databases with mysqldump

IMPORTANT: No space between -p and 'password'

mysqldump -u'username' -p'password' --all-databases > /path/all.sql

Date in file name:

mysqldump -u'username' -p'password' --all-databases > 
/path/all_`date +\%Y\%m\%d_\%H\%M\%s`.sql

875Exporting URLs from Safari Reading List

https://alexwlchan.net/2015/11/export-urls-from-safari-reading-list/

240Moving/Exporting SVN’ed Directories

Situation For whatever reasons, you want to move a directory from one svn repository to another.

Problem Once in a repository, every folder gets an invisible .svn folder, where the svn info instored. Deleting them by hand can be tedious. A script might be cumbersome.

Solution Use svn to export the folder. Exporting basically means getting rid of the .svn/ folders. http://svnbook.red-bean.com/en/1.0/re10.html

Usage

svn export folder/ exported-folder/

Update What does svn add --force myDirectory do?