This file contains 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 RESET AND RECOVER ROOT USER AND PASSWORD!!!! | |
Stop the mysql demon process using this command : | |
sudo /etc/init.d/mysql stop | |
Start the mysqld demon process using the --skip-grant-tables option with this command | |
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking & | |
Because you are not checking user privs at this point, it's safest to disable networking. In Dapper, /usr/bin/mysgld... did not work. However, mysqld --skip-grant-tables did. | |
start the mysql client process using this command | |
mysql -u root |
This file contains 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
// set all links to null | |
$('a').attr('href','#'); | |
// EDIT WHOLE PAGE LIKE IT'S EDITABLE! | |
$('body').attr('contenteditable','true'); |
This file contains 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
<reference name="product_list_toolbar"> | |
<action method="setDefaultDirection" before="product_list_toolbar_pager"><dir>desc</dir></action> | |
</reference> |
This file contains 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
# Magento Snippets # | |
## Download extension manually using pear/mage ## | |
Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/ | |
./pear download magento-community/Shipping_Agent | |
./mage download community Shipping_Agent | |
## Clear cache/reindex ## |
This file contains 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 | |
/** | |
* aheadWorks Co. | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the EULA | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://ecommerce.aheadworks.com/AW-LICENSE.txt |
This file contains 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
net stop w3svc | |
sqlcmd -S .\sqlexpress -E -Q "alter database fb1 set offline" | |
sqlcmd -S .\sqlexpress -E -Q "alter database fb2 set offline" | |
sqlcmd -S .\sqlexpress -E -Q "alter database fb3 set offline" | |
sqlcmd -S .\sqlexpress -E -Q "alter database fb4 set offline" | |
sqlcmd -S .\sqlexpress -E -Q "alter database fb5 set offline" | |
sqlcmd -S .\sqlexpress -E -Q "alter database fb6 set offline" | |
For /F "Tokens=2" %%I in ('Date /T') Do Set datum=%%I |
This file contains 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
(select COUNT(*) from temp.dbo.[tbl1]) union all | |
(select COUNT(*) from temp.dbo.[tbl2]) union all | |
(select COUNT(*) from temp.dbo.[tbl3]) union all | |
(select COUNT(*) from temp.dbo.[tbl4]) |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<!-- BANNER STYLE -::- TEXT OVER PICTURE --> |
This file contains 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
run apache as a local user | |
sudo nano /etc/apache2/envvars | |
export APACHE_RUN_USER=kreso | |
export APACHE_RUN_GROUP=kreso |
This file contains 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
Tricks to add encrypted private SSH key to .travis.yml file | |
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21 | |
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64 | |
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)" | |
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_ | |