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
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! |
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
# 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" |
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/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)' |
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'; umask(0); Mage::app('default'); | |
setlocale(LC_MONETARY, 'en_US'); | |
$customers = Mage::getModel('customer/customer')->getCollection(); | |
$count = 0; | |
foreach ($customers as $customer) { |
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
diff -Naur standard.xml mynewchange.xml > myfile.patch |
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
SELECT table_name AS "Table", | |
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "test" AND table_name like "%" | |
ORDER BY 2 DESC; |
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
$defaultTime = date_default_timezone_get(); | |
date_default_timezone_set('America/Los_Angeles'); | |
$now = date("Y-m-d H:i:s"); | |
date_default_timezone_set($defaultTime); |
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 -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" | |
php composer.phar global require 'phpunit/phpunit=3.7.*' | |
sudo pear channel-discover pear.survivethedeepend.com | |
sudo pear channel-discover hamcrest.googlecode.com/svn/pear | |
sudo pear install --alldeps deepend/Mockery |
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
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt -O /usr/local/bin/add-apt-repository && sudo chmod +x /usr/local/bin/add-apt-repository | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer |
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
package main | |
/* | |
#cgo CFLAGS: -x objective-c | |
#cgo LDFLAGS: -framework Cocoa | |
#import <Cocoa/Cocoa.h> | |
int | |
StartApp(void) { | |
[NSAutoreleasePool new]; |
OlderNewer