Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Justin Boland JUSTIN-BOLAND

🎯
Focusing
  • Seattle, WA
View GitHub Profile
@JUSTIN-BOLAND
JUSTIN-BOLAND / .htaccess
Created Dec 16, 2020 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
View The_Hitchhikers_Guide_To_The_Shelley_Chapter_Three.md

The Hitchhiker's Guide To The Shelley - Chapter 3 - The Staking

This guide's chapter targets the pool operators for getting their head around of Shelley staking. To fully understand the staking mechanism we need to define and interpret the following key concepts:

Keys, Addresses and Certifications

View ExcludeSpamDisplayPlacements_30minExecutionControl
/**
* This MCC level script removes Display placements with Super High CTR AND no view through conversions AND no conversions
* (you can edit these values on the top level variables).
* If one of the placements detected is anonymous.google, the script doesn't exclude it
* The script saves all detected placements in a spreadsheet
* If the script execution is interrupted, it saves the last account executed and will start from that account at the next execution
*
* @author Alberto Esteves
* URL: http://www.albertoestevescorreia.com/adwords-script-eliminar-ubicaciones-display-spam/
*
@JUSTIN-BOLAND
JUSTIN-BOLAND / Ad Component Report with Segments
Created Sep 24, 2020 — forked from siliconvallaeys/Ad Component Report with Segments
Ad component report for Google Ads with segment data
View Ad Component Report with Segments
// Create a report in a Google spreadsheet with performance data by ad component
// Metrics for each unique headline, description, path, and visible URL are aggregated
// Use this data to find the best ad components for use in new ads or responsive search ads
// Free AdWords Script courtesy of Optmyzr.com - try Optmyzr for more PPC tools and scripts
// February 2019
function main() {
var currentSetting = {};
currentSetting.spreadsheetUrl = "NEW";
currentSetting.time = "20180101,20190201"; //"LAST_30_DAYS", "LAST_MONTH", "20180101,20181231"
View AWQL to Spreadsheets
/* Put Google Ads Data in Google Spreadsheet
* -----------------------------------------
*
* Script by Optmyzr.com
*
* v3 (20190702)
* - updated to API v201809
* v2 (20180810)
* - updated to newer reporting version in ads API
*
View Populate Sheets With AdWords Data.js
/*
// AdWords Script: Put Data From AdWords Report In Google Sheets
// --------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This script takes a Google spreadsheet as input. Based on the column headers, data filters, and date range specified
// on this sheet, it will generate different reports.
//
// The goal is to let users create custom automatic reports with AdWords data that they can then include in an automated reporting
// tool like the one offered by Optmyzr.
@JUSTIN-BOLAND
JUSTIN-BOLAND / crawler
Created May 27, 2020 — forked from derekmartinla/crawler
Crawl a site and update Google Sheet with results
View crawler
require 'spidr' # gem install spidr
require 'nokogiri'
require 'google_drive'
GOOGLE_SHEET_ID = "1k26clMVYUX5PLag5K2Ku4osgZcTtWp-wlss1B6CC_KE" # replace with your Google Sheet Id
CRAWL_SITE = "https://www.mywebsite.com"
OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)
@JUSTIN-BOLAND
JUSTIN-BOLAND / gist:32e4f76455f0ca2c46c9a1a93aa5ba88
Created Apr 24, 2020 — forked from mhawksey/gist:1170597
Google Apps Script to fill in a Document template with Spreadsheet data
View gist:32e4f76455f0ca2c46c9a1a93aa5ba88
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
@JUSTIN-BOLAND
JUSTIN-BOLAND / gist:9ec47dcfc43f08fa17487c90872bd8a2
Created Jan 16, 2020 — forked from mhawksey/gist:0c5ad7b79e1162b239156ce946cbe2be
Snippet of code used for DevFest London 2017 to count faces in audience and send to Google Analytics and update image in Google Slides (see https://mashe.hawksey.info/?p=17787)
View gist:9ec47dcfc43f08fa17487c90872bd8a2
import io
import picamera
import cv2
import numpy
import requests
import base64
def hitGA(faces):
print("Sending to GA")
requests.get("http://www.google-analytics.com/collect?v=1" \
@JUSTIN-BOLAND
JUSTIN-BOLAND / face-detection-to-google-analytics.py
Created Jan 16, 2020 — forked from mhawksey/face-detection-to-google-analytics.py
Snippet of code used for DevFest London 2017 to count faces in audience and send to Google Analytics (see https://mashe.hawksey.info/?p=17787)
View face-detection-to-google-analytics.py
import io
import picamera
import cv2
import numpy
def hitGA(faces):
print("Sending to GA")
requests.get("http://www.google-analytics.com/collect?v=1" \
+ "&tid=YOUR_UA_TRACKING_ID_HERE" \
+ "&cid=1111" \