// 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
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 | |
# 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
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
#### 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
#!/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
#!/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
#!/usr/bin/env python | |
""" | |
Generates URN/codes and saves them to separate CSV files - 1 for each depot. | |
URN Format: (\d{3})([A-Z])(\d{3}) | |
Group 1: Random capital letter A-Z (technically unecessary) | |
Group 2: Depot number 01-67 | |
Group 3: Sequence number 001-250 (never repeats) | |
""" |
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 memoizer = function (memo, formula) { | |
var recur = function (n) { | |
var result = memo[n]; | |
if (typeof result !== 'number') { | |
result = formula(recur, n); | |
memo[n] = result; | |
} | |
return result; | |
}; | |
return recur; |
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 | |
""" Quick & dirty script used for downloading latest stock sheet from | |
Google Apps Email and saving to server for further processing""" | |
import email | |
import imaplib | |
import os | |
save_dir = '.' |