Skip to content

Instantly share code, notes, and snippets.

View agaerig's full-sized avatar

Andrew Gaerig agaerig

  • Pitchfork
  • Chicago, IL
View GitHub Profile
const sku = 'swg_stepped_pricing_test';
const getWindowSwg = (context = window) => {
// eslint-disable-next-line compat/compat
return new Promise((resolve, _reject) => {
// SWG (global): represents an array of handlers that are called back
// with a reference to the Subscriptions API once the library is loaded.
// eslint-disable-next-line no-param-reassign
(context.SWG = context.SWG || []).push((swg) => resolve(swg));
});
rsync -v --progress --ignore-existing -a /path/to/itunesLibrary/ /path/to/backup/
newsletterList: [
{
name: 'WIRED Daily',
newsletterId: 216,
slug: 'daily',
subscribe: {
buttonLabel: 'Sign Up Now',
dangerousDek:
'Our biggest stories, delivered to your inbox every day.',
dangerousHed: 'Get WIRED's Daily Newsletter'
newsletterList: [
{
name: 'Daily',
newsletterId: 217,
slug: 'daily',
subscribe: {
buttonLabel: 'Sign Up Now',
dangerousDek:
'The best of <i>The New Yorker</i>, every day, in your in-box.',
dangerousHed: 'The Daily'
newsletterList: [
{
name: 'Wired Daily',
newsletterId: 216,
slug: 'daily',
subscribe: {
buttonLabel: 'Sign Up Now',
dangerousDek:
'Stories from the future, delivered today.',
dangerousHed: 'Get Our Newsleter'
newsletter: {
defaultNewsletterId: 35169,
manage: {
dangerousDek:
"Stay in the know with the latest stories from Vogue",
dangerousHed: 'Sign Up For Our Newsletters'
},
newsletterList: [
{
name: 'Vogue Daily',
https://www.glamour.com/newsletter/unsubscribe?email=linh_nguyen+glm2@condenast.com&newsletterId=248699
https://www.glamour.com/newsletter/unsubscribe?email=linh_nguyen%2Bglm2@condenast.com&newsletterId=248699
Because the email address isn't properly encoded, Hapi will chunk it into something like "linh_nguyen glm2@condenast.com"
class Sponsor(models.Model):
name = models.CharField(max_length=60)
url = models.CharField(max_length=200,
null=True, blank=True)
ordering = models.PositiveIntegerField(default=0)
sponsor_image = PostSaveImageField(
upload_to=upload_path,
thumbnails=(
('medium', ResizeRenderer(200, 200, quality=100)),
('small', ResizeRenderer(105, 105, quality=100)),))
newsletters: [
{
newsletterId: 39,
buttonLabel: 'Sign Me Up',
dangerousDek:
'Sign up to get the latest exclusive from Teen Vogue and friends',
dangerousHed: 'Teen Vogue Daily Newsletter',
name: 'Teen Vogue Daily Newsletter'
},
{
newsletters: [
{
buttonLabel: 'Sign Up',
dangerousDek:
'Today’s biggest stories, from pop culture to politics',
dangerousHed: 'Glamour Daily',
newsletterId: 248699,
name: 'Glamour Daily'
},
{