Skip to content

Instantly share code, notes, and snippets.

View underdown's full-sized avatar

Ryan Underdown underdown

  • Classy Closets
  • Phoenix, AZ
View GitHub Profile
@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>
/***********************************************************************************************
* AdWords Account Optimization - Review Google Display Network Site Placement Quality.
* Analyze Display Network Placements that have accrued more than $20 of cost MTD against
* Standard SEO metrics (PageAuthority, DomainAuthority, # of Backlinks, Age of Site) and report back
* Any questionable placements that are strong targets for exclusion.
* Created By: Derek Martin
* DerekMartinLA.com
****************************************************************************************/
// CONSTANTS
@derekmartinla
derekmartinla / gist:b719840542406322bb27
Last active June 2, 2017 14:20
AdWords Countdown Ads Updater Script
/***************************************************************************************
* AdWords Countdown Ad Updater -- Find stale countdown ads and replace them with
* Ads that are updated with new dates.
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com or MixedMarketingArtist.com
****************************************************************************************/
var DESCRIPTION2_TEXT = "Sale Ends In"
@derekmartinla
derekmartinla / gdn-placement-analysis
Last active July 12, 2023 09:08
Find Underperforming Placements & Opportunities On Google Display Network
// This script reviews your GDN placements for the following conditions:
// 1) Placements that are converting at less than $40
// 2) Placements that have cost more than $50 but haven't converted
// 3) Placements that have more than 5K impressions and less than .10 CTR
function main() {
var body = "<h2>Google Display Network Alert</h2>";
body += "<h3>Placements that are converting at less than $40:</h3> " ;
body += "<ul>";
@Wysie
Wysie / gist:03934b6a79a715772abd
Last active December 10, 2019 20:01
Upload to Amazon S3 Instead of Server for Sendy Email Image Uploads
//Using S3.php from https://github.com/tpyo/amazon-s3-php-class. Place it in includes/helpers
//Replaces Sendy's includes/create/upload.php
<?php
include('../functions.php');
include('../login/auth.php');
require_once('../helpers/S3.php');
//Init
$file = $_FILES['file']['tmp_name'];
@rupl
rupl / user-actions.js
Last active May 11, 2018 22:46
A CasperJS script to demonstrate simple user navigation actions on a website. This sample accompanies a blog post about CasperJS found at http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
/**
* @file
* Simulating user actions with CasperJS. This script explores the ability to
* use Casper for navigation just like a user would: clicking the page and
* entering text to submit a form. This script accompanies a blog post from
* Four Kitchens:
*
* @see http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
*/
@kaspergrubbe
kaspergrubbe / install-graphite-ubuntu-13.04.sh
Last active October 4, 2020 11:53 — forked from jgeurts/install-graphite-ubuntu-12.04.sh
Don't overwrite the local_settings.py
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 16. June 2013
####################################
# This is apparantly needed for python when running manage.py
# described here: http://stackoverflow.com/questions/11593556/django-createsuperuser-not-working
export LANG=en_US.UTF-8
@jdevalk
jdevalk / .htaccess
Last active November 28, 2023 20:28
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@mhawksey
mhawksey / gist:5419876
Last active August 24, 2018 19:33
Google Apps Script to get feed post count and last post date
function fetchFeedItemCount(url,optType) {
var type = optType || "feed";
var output = [];
//var url = "http://confessionsofalearningtechnologist.blogspot.com/feeds/posts/default?alt=rss";
// little switch to get rss2 feed for blogger
if (/\/posts\/default$/.test(url)){
url += "?alt=rss";
}
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter