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
@underdown
underdown / split test cookie
Last active August 29, 2015 14:01
split testing w cookies
@underdown
underdown / gist:2b69b5e48966918b1763
Last active November 24, 2020 00:52
htaccess deflate, caching
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
Header set Referrer-Policy "same-origin"
</IfModule>
AddOutputFilterByType DEFLATE text/plain
@underdown
underdown / gist:237694a7b39d03b282a6
Created October 9, 2014 20:44
modpagespeed settings
ModPagespeedDomain domain.com
ModPagespeedMapOriginDomain 1.1.1.1 domain.com
ModPagespeedEnableFilters convert_png_to_jpeg
ModPagespeedEnableFilters sprite_images
ModPagespeedEnableFilters insert_image_dimensions
ModPagespeedEnableFilters move_css_above_scripts
ModPagespeedEnableFilters move_css_to_head
ModPagespeedEnableFilters canonicalize_javascript_libraries
#ModPagespeedDisableFilters rewrite_javascript
@underdown
underdown / adwords-ad-scheduling
Created January 13, 2015 23:20
Adwords Ad scheduling
/**
*
* Advanced ad scheduling
*
* This script will apply ad schedules and set the bid modifier for the schedule
* at each hour according to a multiplier timetable in a Google sheet.
*
* Version: 1.0
* brainlabsdigital.com
*
// 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>";
/***************************************************************************************
* 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"
/***********************************************************************************************
* 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
@underdown
underdown / auto-follow-twitter.js
Last active August 4, 2023 20:20
auto follow twitter
a = setInterval(function () {
window.scrollTo(0,document.body.scrollHeight);
$('.not-following .user-actions-follow-button.js-follow-btn').click();
}, 4000);
/* changed setinterval to 4k ms - original source here https://medium.com/@karanjthakkar/how-i-grew-from-300-to-5k-followers-in-just-3-weeks-2436528da845
Just browse to someones follower list, hit F12 on chrome and plug this snippet into the console tab and hit enter
@underdown
underdown / twitter-auto-unfollow.js
Last active July 15, 2017 11:20
twitter auto unfollow
/*
Just nacigate to twitter.com/following (while logged in), hit f12 (on chrome) and paste this snippet into the console tab
originally found here: http://www.easytins.com/2014/01/how-to-unfollow-many-twitter-users.html
*/
setInterval(function(){t=
$(".following button:eq
(0)");if(!t
@underdown
underdown / amazon-mws-signed-request
Created June 1, 2015 18:02
amazon mws signed request
define ("AWS_ACCESS_KEY_ID", "xxxxx");
define ("MERCHANT_ID", "xxxxx");
define ("MARKETPLACE_ID", "xxxxx");
define ("AWS_SECRET_ACCESS_KEY","xxxxx");
$base_url = "https://mws.amazonservices.com/Products/2011-10-01";
$method = "GET";
$host = "mws.amazonservices.com";
$uri = "/Products/2011-10-01";