$ bq --project_id my_project_id ls --transfer_config --transfer_location=us | grep query-name
projects/my_project_id/locations/us/transferConfigs/config_id query-name scheduled_query SUCCEEDED
$ bq mk --transfer_run --run-time="2020-09-30T23:30:00Z" "projects/my_project_id/locations/us/transferConfigs/config_id"
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 AnyEvent::Semaphore; | |
| use common::sense; | |
| use AnyEvent; | |
| use Try::Tiny; | |
| use Carp 'croak'; | |
| use Class::Accessor::Lite ( | |
| ro => [ qw(limit waiting) ], | |
| ); |
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 AnyEvent::Firebase; | |
| use common::sense; | |
| use AnyEvent; | |
| use AnyEvent::HTTP 'http_request'; | |
| use Carp 'croak'; | |
| use Coro qw(rouse_cb rouse_wait); | |
| use Coro::Semaphore; | |
| use Crypt::JWT 'encode_jwt'; | |
| use JSON::XS; |
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
| from dotenv import load_dotenv | |
| load_dotenv() | |
| import asyncio | |
| import datetime | |
| import functools | |
| import json | |
| import logging | |
| import os |
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
| # invoke (synchronously) a lambda with a bunch of different uid payloads | |
| cat << EOF > user.lst | |
| abc123 | |
| def345 | |
| ... more...uids... | |
| EOF | |
| cat << EOF > sns.json | |
| { | |
| "Records": [ |
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
| """ | |
| parse iso8601 '2019-11-26T18:26:19Z' format string in python | |
| """ | |
| def from_iso8601(datetime_iso: str): | |
| return datetime.datetime.strptime(datetime_iso, "%Y-%m-%dT%H:%M:%S%z") |
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
| """ | |
| Use this to get output that includes the Lambda context RequestId in your CloudWatch logs | |
| This allows you to differentiate the logs of concurrent invocations. | |
| To use in your lambda: | |
| import logging | |
| logging.getLogger().setLevel(logging.INFO) | |
| def handler(event, context): |
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
| /** | |
| * Implements the Browserstack API for setting test sessions to pass/fail status as desribed in | |
| * https://www.browserstack.com/docs/automate/selenium/view-test-results/mark-tests-as-pass-fail | |
| * | |
| **/ | |
| package utils.browserstack; | |
| import com.google.gson.Gson; | |
| import org.apache.http.HttpEntity; | |
| import org.apache.http.HttpResponse; |
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 utils.git; | |
| import org.eclipse.jgit.api.Git; | |
| import org.eclipse.jgit.api.errors.GitAPIException; | |
| import org.eclipse.jgit.lib.Repository; | |
| import org.eclipse.jgit.lib.RepositoryBuilder; | |
| import org.eclipse.jgit.revwalk.RevCommit; | |
| import java.io.File; | |
| import java.io.IOException; |
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
| "use strict"; | |
| const GCP_PROJECT = process.env["GCP_PROJECT"]; | |
| const BQ_DATASET = process.env["BQ_DATASET"]; | |
| const BQ_TABLE = process.env["BQ_TABLE"]; | |
| const S3_BUCKET = process.env["S3_BUCKET"]; | |
| const S3_PREFIX = process.env["S3_PREFIX"]; | |
| const GCP_CREDENTIALS = process.env["GCP_CREDENTIALS"]; |