Skip to content

Instantly share code, notes, and snippets.

View sanbornm's full-sized avatar

Mark sanbornm

View GitHub Profile
@sanbornm
sanbornm / magento-customer-balance.php
Last active August 19, 2020 12:31
Get store credit and rewards points balance for all Magento customers, export to csv
<?php
require_once 'app/Mage.php'; umask(0); Mage::app('default');
setlocale(LC_MONETARY, 'en_US');
$customers = Mage::getModel('customer/customer')->getCollection();
$count = 0;
foreach ($customers as $customer) {
#!/usr/bin/python
# Add "alias tadd='python /path/to/agile.py'" to your
# .bashrc or .bash_profile. I put my agile.py in dropbox
# so I have access to it on every computer.
"""Agile Task Adder"""
__author__ = 'marcrosoft@gmail.com (Mark Sanborn)'
@sanbornm
sanbornm / gist:187815
Created September 16, 2009 02:07 — forked from eriwen/gist:187610
# Sample usage: "checksites.py eriwen.com nixtutor.com ..."
import pickle, os, sys, logging
from httplib import HTTPConnection
from smtplib import SMTP
def email_alert(alert,subject='You have an alert'):
fromaddr = "youremail@domain.com"
toaddrs = "youremail@domain.com"
@sanbornm
sanbornm / gist:177420
Created August 29, 2009 07:14
Simple script to check when your site changes status codes
import pickle, pprint, time, os
import httplib
import smtplib
def emailAlert(alert,subject='You have an alert'):
fromaddr = "youremail@domain.com"
toaddrs = "youremail@domain.com"
# Add the From: and To: headers at the start!