Skip to content

Instantly share code, notes, and snippets.

@danyay
danyay / cropamz.py
Created August 20, 2016 13:07
Crop 4x6" shipping labels out of Amazon FBA PDFs
#!/usr/bin/python
# cropamz.py
# by Dan Nunn
# 2016-08-20
from pyPdf import PdfFileWriter, PdfFileReader
import sys
import os.path
# Default the filename to the first argument, otherwise use package.pdf
@danyay
danyay / order_notify.php
Last active December 23, 2016 22:31
Send a Pushover notification when new orders arrive.
<?php
/**
Amazon Seller Central Order Notifier
Send me a "push" notification for new orders (after polling)
*/
// Disable error reporting for AWS' shitty sdk
error_reporting(E_ALL & ~E_NOTICE);
chdir(dirname(__FILE__));
require_once('.config.inc.php');
@danyay
danyay / .config.inc.php
Created December 23, 2016 16:07
AWS config file for order_notify
<?php
/************************************************************************
* REQUIRED
*
* Access Key ID and Secret Acess Key ID, obtained from:
* http://aws.amazon.com
***********************************************************************/
define('AWS_ACCESS_KEY_ID', 'TODO');
define('AWS_SECRET_ACCESS_KEY', 'TODO');