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 / 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 / amazon-orders-api.php
Last active December 2, 2022 12:58
Amazon MWS Orders API PHP Example
<?php
/*******************************************************************************
* Copyright 2009-2015 Amazon Services. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
*
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
@underdown
underdown / nightcore-oneliner.sh
Last active July 2, 2022 04:34
pipe youtube-dl to ffmpeg
youtube-dl -x --no-continue --no-part https://www.youtube.com/watch?v=AiIu1v988W0 -o - | ffmpeg -i pipe: -filter:a "atempo=1.06,asetrate=44100*1.25" nightcore-version.mp3
@underdown
underdown / adwords-valuetrack
Last active May 10, 2022 20:28
a default Google Ads url tracking template that passes (almost) all ValueTrack parameters
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}&matchtype={matchtype}&device={device}&devicemodel={devicemodel}&target={target}&placement={placement}&mobile={ifmobile:true}{ifnotmobile:false}&creative={creative}&adposition={adposition}&network={network}&campaignid={campaignid}&adgroupid={adgroupid}&loc_interest_ms={loc_interest_ms}&loc_physical_ms={loc_physical_ms}&utm_region=
// I havent added {ignore} to urls as im not sure of its behavior and syntax. Will test.
@underdown
underdown / gist:1367825
Created November 15, 2011 18:07
PHP Google Scraping Function
function findranking($domain, $keyword) {
usleep(400000*rand(0,16)); //set random interval between checks
$url="http://www.google.com/search?q=".urlencode($keyword)."&num=100";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER,1); // set to 0 to eliminate header info from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
$header = array();
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
@underdown
underdown / instagram-follow-script.js
Last active March 4, 2022 23:06
Instagram script for followers
/* source https://www.youtube.com/watch?v=UKi1NwqKCz8
_aj7mu _r4e4p _95tat _o0442
*/
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
jQuery.noConflict()
?utm_source=pinterest&utm_medium=cpc&utm_campaign={{campaign_name}}&utm_content={{adgroup_name}}&utm_content={{creative_id}}
?utm_source=facebook&utm_medium=cpc&utm_campaign={{campaign.name}}&utm_content={{adset.id}}&campaign_id={{campaign.id}}&placement={{placement}}&site_source_name={{site_source_name}}&ad_name={{ad.name}}
@underdown
underdown / gist:6142584
Created August 2, 2013 19:15
responsive ad code from adsense
<style>
.responsive { width: 320px; height: 50px; }
@media(min-width: 500px) { .responsive { width: 468px; height: 60px; } }
@media(min-width: 800px) { .responsive { width: 728px; height: 90px; } }
</style>
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- responsive -->
<ins class="adsbygoogle responsive"
style="display:inline-block"
data-ad-client="ca-pub-3658299045266116"
@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