Skip to content

Instantly share code, notes, and snippets.

View purplespider's full-sized avatar

James Cocker purplespider

View GitHub Profile
@purplespider
purplespider / mysqlclone
Last active August 29, 2015 14:03
Clone Remote (Live) MySQL Database to Local (Dev)
ssh [REMOTE-USER]@[REMOTE-SERVER] mysqldump -u [REMOTE-MYSQL-USER] -p[REMOTE-MYSQL-PASSWORD] [REMOTE-MYSQL-DATABASENAME] | mysql -u [LOCAL-MYSQL-USER] -p[LOCAL-MYSQL-PASSWORD] [LOCAL-MYSQL-DATABASENAME]
@purplespider
purplespider / GenerateCMSThumbs.php
Last active January 15, 2019 09:18
SilverStripe 4 Generate CMS Thumbs Task - Use with legacy_filenames
<?php
namespace PurpleSpider\Tasks;
use SilverStripe\Dev\BuildTask;
use SilverStripe\Control\Director;
use SilverStripe\Assets\File;
use SilverStripe\AssetAdmin\Controller\AssetAdmin;
use SilverStripe\ORM\DB;