Skip to content

Instantly share code, notes, and snippets.

View alispat's full-sized avatar
🎯
Focusing

Alisson Patrick alispat

🎯
Focusing
View GitHub Profile
@alispat
alispat / Landing Page Contents Checker.js
Created January 14, 2019 21:58 — forked from BrainlabsDigital/Landing Page Contents Checker.js
Script to check landing pages for phrases like 'out of stock'
/**
*
* AdWords Script for checking the contents of landing pages.
* Goes to the final URL of keywords or ads, then searches the source code for
* user defined strings.
*
* Version: 1.0
* Google AdWords Script maintained by brainlabsdigital.com
*
**/
@alispat
alispat / Pause Losing Ads.js
Created January 14, 2019 21:55 — forked from BrainlabsDigital/Pause Losing Ads.js
Script to find and label the best performing ads in each ad group, and label/pause the others.
/**
*
* Pause Losing Ads & Ad Rotate Analysis
*
* This script finds the best ad in each ad group (subject to thresholds) and
* calculates the performance you could have got if the impressions that went to
* losing ads went to the winning ads instead.
* Labels the winning and losing ads, and (optionally) pauses the losers.
*
* Version: 2.0
@alispat
alispat / Low Quality Score Alert.js
Created January 14, 2019 21:49 — forked from BrainlabsDigital/Low Quality Score Alert.js
Script to email you if you have low quality score keywords, and optionally label/pause them
/**
*
* Low Quality Score Alert
*
* This script finds the low QS keywords (determined by a user defined threshold)
* and sends an email listing them. Optionally it also labels and/or pauses the
* keywords.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
@alispat
alispat / Expanding Phrase Match Negatives.js
Created January 14, 2019 21:46 — forked from BrainlabsDigital/Expanding Phrase Match Negatives.js
Script to find potential negatives based on search queries that contain an existing phrase negative.
/**
*
* Expanding Phrase Match Negatives
*
* This script searches for all occurrences of phrase match negatives in search
* queries resulting from typos. Outputs a report to a Google Doc spreadsheet.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
*
@alispat
alispat / Change in Campaign Spending Alert.js
Created January 14, 2019 21:46 — forked from BrainlabsDigital/Change in Campaign Spending Alert.js
Script to alert you if a campaign's spend has changed dramatically
/**
*
* Change in Campaign Spending Alert
*
* This script uses the current hour to calculate how much has been spent on
* individual campaigns on the day of running. The average spend up to the
* current hour in a specified numbers of days previously is averaged. If the
* spend today is higher by a specified percentage threshold an alert email
* is sent.
*
@alispat
alispat / ExactMatchScriptUpdated.js
Created January 14, 2019 21:45 — forked from BrainlabsDigital/ExactMatchScriptUpdated.js
Create negatives where search queries are too dissimilar to the keywords they trigger. Based on containing the same words and/or edit distance.
/**
*
* Make Exact Match Exact
*
* Adds negatives for any search query that doesn't actually exactly match an exact
* match keyword.
*
* Version: 2.0
* Google AdWords Script maintained on brainlabsdigital.com
*
@alispat
alispat / ruby_http_post.rb
Created January 31, 2018 11:34 — forked from kinopyo/ruby_http_post.rb
Pure ruby code posting form data with parameters, and get the response.
require 'net/http'
require 'uri'
#1: Simple POST
res = Net::HTTP.post_form(URI.parse('http://www.example.com/search.cgi'),
{'q' => 'ruby', 'max' => '50'})
puts res.body
#2: POST with basic authentication
res = Net::HTTP.post_form(URI.parse('http://jack:pass@www.example.com/todo.cgi'),
@alispat
alispat / deploy.rb
Created January 26, 2018 16:13 — forked from cannikin/deploy.rb
Notify Sentry of a new release via Capistrano
# This task will notify Sentry via their API[1] that you have deployed
# a new release. It uses the release timestamp as the `version`
# (like 20151113182847) and the git ref as the optional `ref` value.
#
# This task requires several environment variables be set (or just
# hardcode the values in here if you like living on the edge):
#
# ENV['SENTRY_API_ENDPOINT'] : API endpoint, https://app.getsentry.com
# ENV['SENTRY_ORG'] : the organization for this app
# ENV['SENTRY_PROJECT'] : the project for this app
@alispat
alispat / deploy.rb
Created January 26, 2018 16:13 — forked from pablopaul/deploy.rb
Notify Sentry of a new release via Capistrano with Auth Token
# This task will notify Sentry via their API[1] that you have deployed
# a new release. It uses the release timestamp as the `version`
# (like 20151113182847) and the git ref as the optional `ref` value.
#
# This task requires several environment variables be set (or just
# hardcode the values in here if you like living on the edge):
#
# ENV['SENTRY_API_ENDPOINT'] : API endpoint, https://app.getsentry.com
# ENV['SENTRY_ORG'] : the organization for this app
# ENV['SENTRY_PROJECT'] : the project for this app
@alispat
alispat / application.js
Created October 11, 2017 17:00 — forked from revskill10/application.js
rails, select2 and ajax
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD