Skip to content

Instantly share code, notes, and snippets.

{
"$id": "buf.validate.AnyRules.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.",
"properties": {
"in": {
"description": "`in` requires the field's `type_url` to be equal to one of the\nspecified values. If it doesn't match any of the specified values, an error\nmessage is generated.\n\n```proto\nmessage MyAny {\n // The `value` field must have a `type_url` equal to one of the specified values.\n google.protobuf.Any value = 1 [(buf.validate.field).any.in = [\"type.googleapis.com/MyType1\", \"type.googleapis.com/MyType2\"]];\n}\n```",
"items": {
"type": "string"
@jafaircl
jafaircl / AdWordsAdTestingScript.js
Last active September 25, 2018 20:58
AdWords Ad Testing Script
var emailAddress = '[email protected]';
var useConversionRate = false;
var confidenceLevel = 0.95;
var thresholdOfCaring = 0.005;
var dateRange = 'ALL_TIME';
var minImpressions = 100;
var apiUrl = 'https://example.com/ab-test';
function main() {
var results = getTestResults(useConversionRate);
@jafaircl
jafaircl / headless-chrome-crawler.js
Last active June 25, 2022 11:44
Crawling subreddits to find questions people ask.
const HCCrawler = require('headless-chrome-crawler');
const nlp = require('compromise');
const retext = require('retext');
const keywords = require('retext-keywords');
const nlcstToString = require('nlcst-to-string');
const fs = require('fs');
(async () => {
const url = 'https://www.reddit.com/r/PPC/';
const results = await crawl(url);
var test = document.getElementById('test');