-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Truncates text. | |
* | |
* Cuts a string to the length of $length | |
* | |
* @param string $text String to truncate. | |
* @param integer $length Length of returned string, including ellipsis. | |
* @param boolean $considerhtml If true, HTML tags would be handled correctly * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `find . -type f | grep -v \.git | grep -v \.DS_Store | grep -v "^.$" | grep -v "modman" | grep -v "composer.json" | grep -v \.txt | grep -v \.pdf | sed 's/\.\///'`; do echo ${i} ${i}; done > modman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Patch apllying tool template | |
# v0.1.2 | |
# (c) Copyright 2013. Magento Inc. | |
# | |
# DO NOT CHANGE ANY LINE IN THIS FILE. | |
# 1. Check required system tools | |
_check_installed_tools() { | |
local missed="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Truncates text. | |
* | |
* Cuts a string to the length of $length and replaces the last characters | |
* with the ending if the text is longer than length. | |
* | |
* See: oikos.org.uk/2013/02/tech-notes-a-wordpress-excerpt-with-html-tags/ | |
* See also: wpengineer.com/2410/dont-use-strlen/ | |
* See also also: oikos.org.uk/2013/02/tech-notes-a-wordpress-excerpt-with-html-tags/#comment-1467093876 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#CONFIG | |
backupDir='/mnt/backup' | |
magentoDir='/var/www/magento/htdocs' | |
magerunPath='/usr/bin/n98-magerun.phar' | |
#NUMBER OF DAYS TO KEEP BACKUPS | |
dailyKeepDays=7 | |
weeklyKeepDays=30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NB: the line with SSH_AUT_SOCK allows SSH Agent forwarding into docker container | |
# NB: umask 002 makes all newly created files group-writable | |
docker-run-with-agent: | |
docker run -t -i \ | |
-v `pwd`/source:/srv/docker-jekyll/source/ \ | |
-v `pwd`/deploy:/srv/docker-jekyll/deploy \ | |
-v `dirname $(SSH_AUTH_SOCK)`:`dirname $(SSH_AUTH_SOCK)` -e SSH_AUTH_SOCK=$(SSH_AUTH_SOCK) \ | |
-p 4000:4000 \ | |
dergachev/docker-jekyll \ | |
/bin/bash -c "umask 002; $(cmd) $(args)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- license --> | |
<config> | |
<global> | |
<!-- global config --> | |
</global> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#author Lyman Lai | |
#date 2013-12-30 | |
#source http://002.yaha.me/item/22728a58-c967-46d5-93eb-2649d684a9aa/ | |
MYSQL_USER="yourname" | |
MYSQL_HOST="localhost" | |
MYSQL_PASSWORD="yourpassword" | |
MYSQL_BIN="$(which mysql)" |