Skip to content

Instantly share code, notes, and snippets.

# read http://peterdowns.com/posts/first-time-with-pypi.html
# make sure to have a ~/.pypirc configured with users and passwords
# go to the package folder
# publish package to test pypi
python setup.py register -r pypitest
python setup.py sdist upload -r pypitest
# publish package to live pypi
python setup.py register -r pypi
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTunesArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@cshtdd
cshtdd / amazon-affiliate-bookmark
Created April 22, 2015 02:52
bookmark to generate amazon affiliate links
javascript:
var affiliateId = "YOUR_AFFILIATE_ID";
var l = window.location.href;
var urlPieces = l.split("/");
var productId = getProductId("dp");
if (!productId){
productId = getProductId("product");
}
/*
loop-sample.cpp
*/
#include <iostream>
using namespace std;
/*
# Build with the following command
declare @param varchar(50)
set @param='PNS,PNR,PUG'
declare @value varchar(50)
set @value='PNR'
select 'yes' as [contains] where charindex(',' + @value + ',', ',' + @param + ',', 0) > 0