Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # A Python 3.x script designed for command-line operation: | |
| # Given a location string, passes it to Google's Geocoding API and prints to stdout: lat, lng, | |
| # level of accuracy, and formatted address, as a single delimited line and, optionally, the raw JSON | |
| # This is one in a series of mundane programming examples: | |
| # - srccon.org/sessions/#proposal-106215 | |
| # - https://docs.google.com/spreadsheets/d/1oaUNiWOyuTmxr0hVgx32vr5XN8E4MEb_2FD56BE6mZA/edit?usp=drive_web | |
| # | |
| # Documentation of Google Maps API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Returns Mobile Speed & Optimization and Desktop Speed & Optimization values in six adjacent columns | |
| * by Cagri Sarigoz | |
| */ | |
| function checkAll(Url) { | |
| //CHANGE YOUR API KEY WITH YOUR_API_KEY BELOW | |
| var key = "YOUR_API_KEY"; | |
| var serviceUrlMobile = "https://www.googleapis.com/pagespeedonline/v4/runPagespeed?url=" + Url + "&strategy=mobile&key=" + key; | |
| var serviceUrlDesktop = "https://www.googleapis.com/pagespeedonline/v4/runPagespeed?url=" + Url + "&strategy=desktop&key=" + key; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Search Query Mining 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: 2.2 | |
| * Updated 2015-09-17: replacing 'KeywordText' with 'Criteria' | |
| * Updated 2016-10-11: replacing 'ConvertedClicks' with 'Conversions' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| A script to generate a Google BigQuery-complient JSON-schema from a JSON object. | |
| Make sure the JSON object is complete before generating, null values will be skipped. | |
| References: | |
| https://cloud.google.com/bigquery/docs/data | |
| https://cloud.google.com/bigquery/docs/personsDataSchema.json | |
| https://gist.github.com/igrigorik/83334277835625916cd6 | |
| ... and a couple of visits to StackOverflow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Broad-match keyword aggregator script | |
| * This script will group equivalent broad match keywords and label based on performence | |
| * | |
| * Version: 1.1 | |
| * Updated 2016-10-11: replaced 'ConvertedClicks' with 'Conversions' | |
| * Google AdWords Script maintained by brainlabsdigital.com | |
| * | |
| **/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mallo64.dataflow | |
| import com.google.api.client.json.GenericJson; | |
| import com.google.api.services.bigquery.model.TableCell; | |
| import com.google.api.services.bigquery.model.TableFieldSchema; | |
| import com.google.api.services.bigquery.model.TableRow; | |
| import com.google.api.services.bigquery.model.TableSchema; | |
| import com.google.cloud.dataflow.sdk.transforms.DoFn; | |
| import org.apache.avro.Schema; | |
| import org.apache.avro.specific.SpecificRecord; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Heat Map Creation Tool | |
| * | |
| * This script calculates the smoothed average performance of each hour of each day | |
| * of the week, and outputs this into a heat map and graph in a Google sheet. It | |
| * also makes suggested bid adjustments based on the conversion rate. | |
| * | |
| * Version: 1.1 | |
| * Updated 2016-10-11: removed 'ConvertedClicks'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*********** | |
| * Collects the reporting results from all accounts | |
| * and generates a nicely formatted email. If there | |
| * are errors for an account, it includes those | |
| * in the email as well since an error in one account | |
| * won't stop the entire script. | |
| ***********/ | |
| function generateReport(results) { | |
| var NOTIFY = ['[email protected]']; | |
| var total_deleted = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function num_subjects(alpha, power_level, p, delta) { | |
| var t_alpha2 = ppnd(1.0-alpha/2); | |
| var t_beta = ppnd(power_level); | |
| var sd1 = Math.sqrt(2 * p * (1.0 - p)); | |
| var sd2 = Math.sqrt(p * (1.0 - p) + (p + delta) * (1.0 - p - delta)); | |
| return (t_alpha2 * sd1 + t_beta * sd2) * (t_alpha2 * sd1 + t_beta * sd2) / (delta * delta); | |
| } |