Skip to content

Instantly share code, notes, and snippets.

View pauldonnelly's full-sized avatar

Paul Donnelly pauldonnelly

View GitHub Profile
@pauldonnelly
pauldonnelly / MYSQL DUMP.ps1
Last active August 29, 2015 14:08
MYSQL DUMP :: Log into folder where you want the SQL Dump to be placed
mysqldump -uUSER -pPASSWORD DBTABLE > dbbackup-25022014.sql
@pauldonnelly
pauldonnelly / Install WordPress via SSH.ps1
Created October 24, 2014 11:19
Install WordPress via SSH
wget http://wordpress.org/latest.tar.gz
tar zxf latest.tar.gz
cd wordpress
cp -rpf * ../
cd ../
rm -rf wordpress/
rm -f latest.tar.gz
@pauldonnelly
pauldonnelly / git-tagging
Created October 24, 2014 11:16
Git Tagging
git tag -am "Some Notes" 1.0
git push origin master 1.0
@pauldonnelly
pauldonnelly / Git-Alias-Shortcuts
Created October 24, 2014 11:15
Git Alias - Shortcuts
git config alias.com commit
git config alias.co checkout
git config alias.mer merge
git config alias.st status
@pauldonnelly
pauldonnelly / GIT-Hotfix
Created October 24, 2014 11:14
GIT Hotfix
GIT Hotfix
// Switch to master branch
git checkout master
//Pull latest code to master branch (you want your local version to be as up to date as possible)
git pull
@pauldonnelly
pauldonnelly / git-commands
Created October 24, 2014 11:11
GIT Commands Cheat Sheet
=== Basic Commands ===
git status
checks the status of your files
git add
multipurpose command; allows you to track files, stage files, and mark merge conflicted files as resolved
git diff
compares working directory to staging area
@pauldonnelly
pauldonnelly / get_magento_urls.php
Last active August 29, 2015 14:08
Get Magento URLS
Get Url in phtml files
1. Get Base Url :
<?php echo Mage::getBaseUrl(); ?>
2. Get Skin Url :
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>
@pauldonnelly
pauldonnelly / if_homepage.php
Created October 24, 2014 10:56
Check if Homepage
<?php if(Mage::getSingleton('cms/page')->getIdentifier() == 'home' && Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') : ?>
<?php endif; ?>
@pauldonnelly
pauldonnelly / get_URL.php
Created October 24, 2014 10:55
Magento Get URL
<?php echo $this->getUrl('') ?>
@pauldonnelly
pauldonnelly / best_sellers_on_homepage
Last active August 29, 2015 14:08
Add Featured/Best Seller Products To Magento Store Homepage. Create a category to contain the featured products. Call it e.g. Featured” or “Home Page”. Set “Is Active” to No. That way, it won’t display in the catalog menu. After saving the category, please note what ID it gets. You can see it in the last part of the URL. If the URL ends with cat…
{{block type="catalog/product_list" category_id="8" template="catalog/product/list.phtml"}}