Skip to content

Instantly share code, notes, and snippets.

mysql.server start
mysql.server stop
mysql.server restart
If not sym linked use path:
sudo /usr/local/mysql/support-files/mysql.server restart
@mdkrog
mdkrog / gist:6d30f9a87712c0fc4ec5
Last active August 29, 2015 14:04
Squarespace Environments
# make sure we're on master
$ git checkout master
# add a remote ref for the development site
$ git remote add dev-site https://sitename-dev.dev.squarespace.com/template.git
# force push our live site to the dev site
$ git push -f dev-site master
# add a dev tracking branch from the dev site
@mdkrog
mdkrog / gist:fa05e06dddc18e91c093
Created August 7, 2014 13:29
Remove remote branch
# soft delete
git branch -d -r remote_name/branch_name
# hard delete
git push origin :branchname
su gsadmin
@mdkrog
mdkrog / gist:bd942067686bb1edb75a
Created September 3, 2014 08:34 — forked from ryannealmes/gist:d112483d59563bc11499
MySQL Exports and Imports
Dump:
mysqldump -uUSERNAME -pPASSWORD DBTODUMP > /path/to/DUMPFILE.sql
Import:
mysql -uUSERNAME -pPASSWORD DBTOIMPORTTO < /path/to/DUMPFILE.sql/
@mdkrog
mdkrog / gist:5114ba244370002b1c1c
Created September 3, 2014 08:35 — forked from ryannealmes/gist:63aa726fffdd0d647f11
Copying files from the server to local
scp username@remotecomputer:/path/to/file/you/want/to/copy where/to/put/file/on/laptop
@mdkrog
mdkrog / gist:2d63a1fd24d83742c842
Created March 18, 2015 09:01
Copying files up to server
scp source_file_name username@destination_host:destination_folder
@mdkrog
mdkrog / gist:2149d877a814b3dec60e
Created May 6, 2015 07:18
Get Rid of duplicate versions of gems in gem files
bundle clean --force
@mdkrog
mdkrog / gist:1bfeb86c38a1d65d11e0
Created September 3, 2015 11:50
List Directory Sizes
du -h --max-depth=1 | sort -hr
@mdkrog
mdkrog / gist:3f5538ddc3f9e83d5597
Created September 30, 2015 07:39 — forked from ryannealmes/gist:353dcc7f185729c2958d
How to kill all processes with a given name
kill $(ps aux | grep '[d]elayed_job' | awk '{print $2}')
Credit:
http://stackoverflow.com/questions/3510673/find-and-kill-a-process-in-one-line-using-bash-and-regex