Skip to content

Instantly share code, notes, and snippets.

View chipoglesby's full-sized avatar
🏠
Working from home

Chip Oglesby chipoglesby

🏠
Working from home
View GitHub Profile
@chipoglesby
chipoglesby / HWplot.R
Created December 12, 2016 19:21 — forked from MarkEdmondson1234/HWplot.R
A function to plot a holtWinters timeseries in ggplot2
#HWplot.R
library(ggplot2)
library(reshape)
HWplot<-function(ts_object, n.ahead=4, CI=.95, error.ribbon='green', line.size=1){
hw_object<-HoltWinters(ts_object)
@chipoglesby
chipoglesby / knit_cloudstorage.rmd
Created January 23, 2017 16:19 — forked from mwhitaker/knit_cloudstorage.rmd
Use googleCloudStorageR to automatically upload to Cloud Storage
---
title: "Host image files on Google Cloud storage"
author: "Michael Whitaker"
date: "January 12, 2017"
output:
html_document:
self_contained: false
---
```{r setup, include=FALSE}
@chipoglesby
chipoglesby / Duplicate Query Checker.js
Created January 25, 2017 21:31 — forked from BrainlabsDigital/Duplicate Query Checker.js
Creates a report detailing which search queries are triggering multiple ad groups.
/**
*
* Duplicate Query Checker
*
* Creates a report detailing which searches are triggering multiple ad groups.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
*
*/
@chipoglesby
chipoglesby / export-to-csv.gs
Created April 4, 2017 15:59 — forked from mderazon/export-to-csv.gs
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
library(tidyverse)
library(broom)
library(scales)
theme_set(theme_minimal())
crossing(n = round(10 ^ seq(1, 7, .1)),
delta = 10 ^ seq(-1, -3, -1),
sig.level = .05,
sd = .3) %>%
invoke(power.t.test, ., type = "one.sample") %>%
@chipoglesby
chipoglesby / send_twilio_sms.sh
Created July 4, 2017 21:38 — forked from johnl/send_twilio_sms.sh
bash script to send twilio sms
#!/bin/bash
# Script to send an SMS alert via Twilio.
# handy for nagios.
# supports proper Twilio API keys, so you don't have to share your user token
# https://www.twilio.com/docs/api/rest/request
function printHelpAndExit {
echo "usage: ./`basename $0` -a \"twilio account sid\" -u \"twilio api key sid\" -p \"twilio api key secret\" -s \"sender number\" -d \"destination number\" -m \"message\"]"
echo "optionally add -l to enable logging to syslog using the logger command"
echo "example: ./`basename $0` -a \"ACxxxxxxxxxxxxxxxxxxxx\" -u \"SKxxxxxxxxxxxxxxxx\" -p \"xxxxxxxxxxxxxxxx\" -s \"+4401274000000\" -d \"+4401130000000\" -m \"HTTP Timed out after 10 seconds\""
/**
*
* Extended Devices, Locations and Audiences Bidding
*
* Automatically apply modifiers to your devices, locations, in-market and remarketing audiences based on performance.
* It analyses search and display campaigns only.
*
* Version: 1.0
* Google Ads Script maintained on brainlabsdigital.com
*
@chipoglesby
chipoglesby / CharityUnderspendingScript.js
Created May 3, 2019 01:21 — forked from BrainlabsDigital/CharityUnderspendingScript.js
Prevent grant accounts on Google Ads from underspending by activating extra keywords when the account is below budget.
/**
*
* This tool prevents your account from underspending by enabling a set of
* labeled keywords when the account's spending is below budget.
* If the account begins to spend over budget, these keywords are paused.
*
*/
function main() {
@chipoglesby
chipoglesby / BudgetDepletionWarner.js
Created May 3, 2019 01:21 — forked from BrainlabsDigital/BudgetDepletionWarner.js
Sends email warnings when more than a given percentage of campaign's budgets has been spent.
function main() {
var CAMPAIGN_NAME_CONTAINS = [];
// Use this if you only want to look at some campaigns.
// For example ["Generic"] would only look at campaigns with 'generic' in the name,
// while ["Generic", "Competitor"] would only look at campaigns with either
// 'generic' or 'competitor' in the name.
// Leave as [] to include all campaigns.
var CAMPAIGN_NAME_EXCLUDES = [];
// Use this if you want to exclude some campaigns.
@chipoglesby
chipoglesby / Search Query Mining With Quality Score.js
Created May 3, 2019 01:21 — forked from BrainlabsDigital/Search Query Mining With Quality Score.js
Search Query Mining With Quality Score Tool. This script calculates the contribution of each word or phrase found in the search query report and outputs a report into a Google Doc spreadsheet.
/**
*
* Search Query Mining With Quality Score Tool
*
* This script calculates the contribution of each word or phrase found in the
* search query report and outputs a report into a Google Doc spreadsheet.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
*