Skip to content

Instantly share code, notes, and snippets.

@beccasaurus
beccasaurus / # 🚀 GAPIC Code Samples (syntax v2) .md
Last active April 1, 2019 23:27
🚀 GAPIC Code Samples (syntax v2) .yaml
@beccasaurus
beccasaurus / Code Sample with Declarative Test .yaml
Last active April 1, 2019 03:34
Code Sample with Declarative Test .yaml
samples:
- sample_id: transcribe_audio_file
description: Transcribe an audio file
type: SINGLE_RPC
api_method:
full_rpc: google.cloud.speech.v1.Speech.Recognize
api_request:
fields:
config:
@beccasaurus
beccasaurus / . $ sampletester :: Dogs Code Samples .md
Last active May 8, 2019 17:30
$ sampletester :: Dogs Code Samples

$ sampletester :: Dog Code Samples 🐕

This contains scripts which support the following:

  • create_dog – Create dog with provided name
  • list_dogs – List all dog names
  • delete_dogDelete dog with provided name

These scripts demonstrate the sampletester tool.

See related section in the TESTING_GUIDE here:

@beccasaurus
beccasaurus / Chrome Extension Messaging WIP .js
Created November 21, 2018 00:59
Chrome Extension Long-Running Messaging WIP
// I could use a class and whatnot.
// Maybe later.
// Just making it work.
//
// Interface: sendMessage({ message }, (response) => {})
// listenForMessages((message, sendResponse) => {})
//
var __messagingPort__ = null
const __messagingPortName__ = "OkCupidExtension"
@beccasaurus
beccasaurus / . 🔥💋 OkCupid "Who Likes You" Extension .md
Last active May 1, 2024 20:40
🔥💋 OkCupid "Who Likes You" Extension

💘 OkCupid "Who Likes You" Extension


Yes, I did.

The Who Likes You page SUCKS to manage.

@beccasaurus
beccasaurus / ++ Vision Partial GAPICs ++ 🦇.md
Last active October 31, 2018 13:56
Vision Partial GAPICs & you! 🦇

🖋 GAPIC :: Library Partials

So you want to write a partial helper, eh?

Hand-written code adds all kinds of functionality on top of generated GAPIC client libraries!

Let's look at the most common type of hand-written extension:

>> Helper Methods added to service object which wraps call to 1 rpc method <<

@beccasaurus
beccasaurus / . gRPC Dogs API – with GAPIC generated libraries 🐕 .md
Last active February 26, 2019 07:14
gRPC Dogs API – with GAPIC generated libraries 🐕

gRPC Dogs API :: with GAPIC generated libraries 🐕

🔬 potential source material for a simple gRPC/GAPIC codelab

This sample contains:

File Description
dogs.proto Defines dogs API, e.g. rpc methods to create/list/delete dogs
dogs_server.js Node.js implementation of the defined dogs API, e.g. implements the create/list/delete dogs methods
@beccasaurus
beccasaurus / . Cloud Talent Solution :: HTML ̸JavaScript Getting Started .md
Last active February 26, 2019 06:03
📚 [Cloud Talent Solution] Job Search :: Getting Started (HTML/JavaScript)

Google Cloud Platform logo

Cloud Talent Solution – Job Search

Getting Started (HTML/JavaScipt)

This sample demonstrates how to interact with the [Cloud Talent Solution Job Search API][job_search]
using the [Google APIs Client Library for JavaScript][gapi_github] from a front-end webpage.

@beccasaurus
beccasaurus / _🐙 GitHub ̸pulls 🐈 Custom Button.md
Last active October 17, 2018 13:33
🐙 GitHub ̸pulls 🐈 Custom Button (Saved Search)

![Screenshot of GitHub pulls page with custom button added][screenshot]

... because I got annoyed that PRs disappear from the dashboard after submitting a review...
... even it the PR is still very active, it's basically out of sight / out of mind ...
... 45 LOC to make my life easier ... 🤘

curl -LO https://gist.github.com/beccasaurus/eb9e91a877046939b7b548a2dfb57ef0/archive/master.zip
unzip master.zip
@beccasaurus
beccasaurus / _ Minimal Pure Ruby Testing _.md
Last active June 29, 2019 03:59
💎 Minimal Pure Ruby Testing

Minimal Ruby Testing 💎

...because Ruby doesn't ship with a testing framework (anymore)

$ testing.rb is 50 lines of code

require "testing"

test "String equal?" do