./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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 | |
/** | |
* Clear cache CLI style | |
* | |
* | |
* @category Mage | |
* @package Mage_Shell | |
* @copyright Copyright (c) 2015 Bjarne Oeverli (http://bjarneo.codes) | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.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
var r = 0, | |
len = 1000000, | |
a = 0, b = 0; | |
while (len--) { | |
r = Math.floor(Math.random() * 2) + 1; | |
if (r === 1) { | |
a++; | |
} else { |
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
" Vim Cheat sheet | |
" http://vim.rtorr.com/ | |
" If ctrl + s freezes your vim, use this config in .bashrc to disable sending xoff | |
" stty -ixon | |
" This command will remove trailing whitespace on save | |
autocmd BufWritePre *.* :%s/\s\+$//e | |
" Set line numbers |
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
#!/usr/bin/env python | |
import urllib | |
import urllib2 | |
import json | |
config = { | |
'api': 'https://api.pushover.net/1/messages.json', | |
'user': 'user_key', | |
'token': 'your_token' |
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
#!/usr/bin/env python | |
import urllib | |
import urllib2 | |
import base64 | |
import json | |
config = { | |
'api': 'https://api.pushbullet.com/v2/pushes', | |
'token': 'your_token' |
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
find . -iname '*php' | xargs grep 'mysql' -sl | while read x; do echo $x; sed -i 's/mysql/mysqli/' $x; 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
var isTransformSupported = function() { | |
var prefixes = [ | |
'transform', | |
'WebkitTransform', | |
'MozTransform', | |
'OTransform', | |
'msTransform' | |
], len = prefixes.length; | |
while (len--) { |
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
$now = time(); | |
$cache_timer = get_option('frontpage_categories_box_cachetime', $now); | |
if ($cache_timer > $now) { | |
$content = get_option('frontpage_cateogires_box_content'); | |
if (empty($content)) { | |
ob_start(); | |
include 'views/frontpage_categories_box.php'; | |
$content = ob_get_clean(); | |
update_option('frontpage_cateogires_box_content', $content); | |
update_option('frontpage_categories_box_cachetime', (time() + (60 * 60))); |
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
SET FOREIGN_KEY_CHECKS=0; | |
-- Customers | |
TRUNCATE `customer_address_entity`; | |
TRUNCATE `customer_address_entity_datetime`; | |
TRUNCATE `customer_address_entity_decimal`; | |
TRUNCATE `customer_address_entity_int`; | |
TRUNCATE `customer_address_entity_text`; | |
TRUNCATE `customer_address_entity_varchar`; | |
TRUNCATE `customer_entity`; |