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 | |
| synclient TouchpadOff=$(synclient -l | grep -c 'TouchpadOff.*=.*0') |
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 | |
| mediaPath="/var/www/magento/htdocs/media" | |
| backupPath="/mnt/backup/media" | |
| rsync -avr "$mediaPath/catalog" "$mediaPath/wysiwyg" "$mediaPath/categoriesDescription" --exclude="catalog/product/cache" --exclude=".thumbs" $backupPath |
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
| mysql --user=username --password=your_pass --database=dbname -B -N -e "SHOW TABLES" | awk '{print "ALTER TABLE", $1, "CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;"}' | mysql --user=username --password=your_pass --database=dbname & |
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 | |
| #Default settings | |
| username="root" | |
| dbname="db" | |
| host="localhost" | |
| while getopts ":u:d:h:" opt; do | |
| case "$opt" in | |
| u) username=$OPTARG;; | |
| d) dbname=$OPTARG;; |
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
| screen -r | screen -ls | sed 's/\..*//' | sed -n '/^\s[0-9]./p' |
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 f in $(find . -name "*.jpg"); do convert -quality 50 $f $f; echo $f; done |
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 | |
| $installer = $this; | |
| $installer->startSetup(); | |
| $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
| $attribute = array( | |
| 'group' => 'General', | |
| 'type' => 'varchar', |
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
| export PS1="\[$(tput bold)\]\[$(tput setaf 2)\][\u@\h\[$(tput setaf 1)\] \w\[$(tput setaf 2)\]]\\$ \[$(tput sgr0)\]" |
NewerOlder