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
# MWS API docs at http://docs.developer.amazonservices.com/en_US/orders-2013-09-01/Orders_Datatypes.html#Order | |
# MWS Scratchpad at https://mws.amazonservices.com/scratchpad/index.html | |
# Boto docs at http://docs.pythonboto.org/en/latest/ref/mws.html?#module-boto.mws | |
from boto.mws.connection import MWSConnection | |
... | |
# Provide your credentials. | |
conn = MWSConnection( |
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
document.body.style.background = '#fff'; | |
var links = $('a:contains("match bid")'); | |
if (links.length) { | |
links.click(); | |
} else { | |
var next = $('.a-last a'); | |
if (next.length) { | |
next.click(); | |
} else { | |
document.body.style.background = '#fee' |
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
// Forgets the current user (similar to clearing cookies) | |
// if he changes the email address. | |
// | |
// Requires jQuery and the "Not You" setting on the Pardot form. | |
// | |
$(function() { | |
var $email, $notYou, href; | |
// Get the email section from the Pardot form. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
from cStringIO import StringIO | |
from django.core.files.base import ContentFile | |
from django.db import models | |
from PIL import Image | |
class SomeModel(models.Model): | |
image = models.ImageField(upload_to='images', blank=True) | |
thumbnail = models.ImageField(upload_to='thumbnails', blank=True) | |
def create_thumbnail(self): |
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
from cStringIO import StringIO | |
from django.core.files.base import ContentFile | |
from django.db import models | |
from PIL import Image | |
class SomeModel(models.Model): | |
image = models.ImageField(upload_to='images', blank=True) | |
thumbnail = models.ImageField(upload_to='thumbnails', blank=True) | |
def create_thumbnail(self): |
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
Here's how I installed hg-git on Windows using the MinGW compiler. | |
PREPARE | |
------- | |
- Install Python (http://www.activestate.com/activepython/downloads) | |
- Install the Python package manager, setuptools (http://pypi.python.org/pypi/setuptools) | |
- Install the MinGW installer (http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/) | |
- Install the C compiler, MinGW gcc, and a utility, pexports, to help create the import library |