I hereby claim:
- I am coryan on github.
- I am coryan (https://keybase.io/coryan) on keybase.
- I have a public key whose fingerprint is A06E F208 44CE DA02 A216 58E5 7821 E6AA 1F16 C53C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Sometimes I find it convenient to create a VM to compile or test JayBeams. I grew tired of point and clicking the commands are:
PROJECTID= ## Your project ID here
ZONE= ## A valid GCP zone here
VM= ## Name your VM here
gcloud compute instances create $VM --zone $ZONE \
--machine-type "n1-standard-2" --subnet "default" \
--maintenance-policy "MIGRATE" \
// Also available here: | |
// https://godbolt.org/z/CAmvFF | |
#include <functional> | |
#include <memory> | |
struct MyFunctor { | |
MyFunctor() : x(0) {} | |
MyFunctor(MyFunctor const& rhs) : x(1) {} | |
MyFunctor(MyFunctor&& rhs) : x(2) {} |
// Copyright 2019 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
#include <benchmark/benchmark.h> | |
#include <functional> | |
#include <memory> | |
#include <utility> | |
struct Base { | |
virtual ~Base() = default; | |
virtual int exec(char*,int) = 0; | |
}; |
# Copyright 2020 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
curl -i -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Length: 0" -H "Content-Type: text/plain" -H "x-goog-resumable: start" -H "x-goog-meta-key1: value1" "https://storage.googleapis.com/${BUCKET_NAME}/test-meta-key.txt"
HTTP/2 201
content-type: text/plain; charset=utf-8
x-guploader-uploadid: [censored]
location: https://storage.googleapis.com/$BUCKET_NAME/test-meta-key.txt?upload_id=[censored]
content-length: 0
date: Thu, 11 Mar 2021 01:57:02 GMT
server: UploadServer
# syntax=docker/dockerfile:1.3-labs | |
# test using | |
# docker buildx build --progress plain -t test - <Dockerfile | |
FROM rockylinux:8 | |
RUN dnf -y update | |
RUN dnf -y groupinstall "Development Tools" | |
RUN dnf -y install gcc-toolset-10-gcc curl | |
RUN dnf -y install gdb | |
RUN curl -sSL https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 -o /usr/bin/bazel |
using RecognizeStream = google::cloud::AsyncStreamingReadWriteRpc< | |
google::cloud::speech::v1::StreamingRecognizeRequest, | |
google::cloud::speech::v1::StreamingRecognizeResponse>; | |
// Print the responses as they are received. | |
google::cloud::future<void> ReadTranscript(RecognizeStream& stream) { | |
while (true) { | |
auto response = co_await stream.Read(); | |
// Terminate the loop if the stream is closed or has an error. | |
if (!response) co_return; |