// shipping_cdl setup in the admin area under shipping methods
$orderModel = Mage::getModel('sales/order');
$orderModel->reset()->load($orderId);
$orderModel->addStatusHistoryComment('Sent to CDL', 'shipping_cdl');
$orderModel->setStatus('shipping_cdl')->save();
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
#!/usr/bin/env python | |
import email | |
import imaplib | |
import os | |
import sys | |
detach_dir = '.' # directory where to save attachments (default: current) | |
files = os.listdir('.') |
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 | |
### Install LEMP Stack on OSX Mavericks | |
# Make sure xcode CLI tools installed | |
xcode-select --install | |
# Install homebrew | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
# Install nginx |
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
#### NOTES: #### | |
# UNDER DEVELOPMENT | |
#Chrome | |
#Opera | |
#Firefox | |
# HomeBrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
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
module.exports = function(grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
phplint: { | |
local: { | |
files: [{ | |
expand: true, | |
cwd: 'app/code/local/', |
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 | |
# Disable SELinux | |
sudo su | |
echo 0 >/selinux/enforce | |
setenforce Permissive | |
# Yum Update | |
sudo yum -y update |
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
var fs = require('fs'); | |
var file = fs.createReadStream('origin.txt'); | |
var destFile = fs.createWriteStream('destination.txt'); | |
// Not surte why end: false required as it seems silly to close midway through copying? | |
file.pipe(destFile, {end: false}); | |
file.on('end', function(){ | |
destFile.end('Finished!'); |
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 | |
# Count number of headers in all CSV files in the current directory | |
for i in `ls`; do echo $i; head -1 $i | sed 's/,/ /g' | wc -w;done |
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
grep 'user\|dbname\|pass' app/etc/local.xml | tr -d '\n' | sed 's/<username><\!\[CDATA\[\(.*\)\]\]><\/username>.*<password><\!\[CDATA\[\(.*\)\]\]><\/password>.*<dbname><\!\[CDATA\[\(.*\)\]\]><\/dbname>/ mysqldump -u\1 -p\2 \3 > ..\/\3.sql/g' | sh |