./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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
sudo aptitude -y install nginx | |
cd /etc/nginx/sites-available | |
sudo rm default | |
sudo cat > jenkins | |
upstream app_server { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; |
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 | |
##Get product image## | |
<?php |
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 | |
//get import resource helper | |
$helper = Mage::getResourceHelper('importexport'); | |
//get next auto increment id | |
$res = Mage::getSingleton('core/resource'); | |
$readConnection = $res->getConnection('core_read'); | |
$table = $res->getTableName('catalog_product_entity'); | |
$id = Mage::getResourceHelper('importexport')->getNextAutoincrement("{$table}"); |
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
#for Fooman Speedster 2 nginx rewrite rule | |
location /skin/m/ { | |
rewrite ^/skin/m/([^/]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1; | |
} |
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
#!/bin/sh | |
# purge-cache: Script to purge varnish cache. Defaults are defined in | |
# /etc/default/varnish. | |
# | |
# Cosimo <[email protected]> | |
# Based on reload-vcl, by Stig Sandbeck Mathisen <ssm at debian dot org> | |
# Settings | |
defaults=/etc/default/varnish |
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
#!/bin/sh | |
# purge-cache: Script to purge varnish cache. Defaults are defined in | |
# /etc/default/varnish. | |
# | |
# Cosimo <[email protected]> | |
# Based on reload-vcl, by Stig Sandbeck Mathisen <ssm at debian dot org> | |
# Settings | |
defaults=/etc/default/varnish |
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
# http://www.mono-project.com/Compiling_Mono_on_OSX | |
require 'formula' | |
class Mono < Formula | |
#url 'http://download.mono-project.com/sources/mono/mono-3.0.6.tar.bz2' | |
#sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77' | |
url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2' | |
sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de' | |
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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$quote = Mage::getModel('sales/quote') | |
->setStoreId(Mage::app()->getStore('default')->getId()); | |
$product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product ID */ |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
OlderNewer