View nginx.conf
This file contains 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
server { | |
listen 8080; | |
server_name _; | |
gzip on; | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
} | |
} |
View function.js
This file contains 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
const {Firestore} = require('@google-cloud/firestore'); | |
const firestore = new Firestore(); | |
exports.helloWorld = async (req, res) => { | |
const document = firestore.doc('users/steren'); | |
const doc = await document.get(); | |
console.log('Read the document'); | |
res.status(200).send('Hey'); | |
}; |
View enable-fb-hosting-cloud-run.sh
This file contains 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
#!/bin/bash | |
# Set up Firebase Hosting in front of a Cloud Run service, without using the firebase CLI | |
# The following commands must be installed: | |
# - gcloud | |
# - curl | |
# - jq | |
# Update these variables | |
PROJECT_ID="enable-fb-hosting" # Make sure you have enabled Firebase on this Google Cloud project |
View chunked.go
This file contains 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 main | |
import ( | |
//"bytes" | |
//"io/ioutil" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" |
View sterenfr.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View secret-santa-principle.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View cloudbuild.yaml
This file contains 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
steps: | |
- name: 'jrottenberg/ffmpeg' | |
args: ['-i', 'input.mp4', 'output.avi'] | |
artifacts: | |
objects: | |
location: 'gs://steren-test-oneshot/' | |
paths: ['output.avi'] |
View loadtest.sh
This file contains 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
# Read docs at https://artillery.io/docs/cli-reference/#quick | |
npx artillery quick --rate 1 --duration 20 https://myapp.dev |
View curl.sh
This file contains 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
$ curl -H "Metadata-Flavor:Google" http://metadata.google.internal/computeMetadata/v1/project/project-id |
View package.json
This file contains 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
{ | |
"name": "hello-ts", | |
"version": "1.0.0", | |
"description": "Hello TS", | |
"scripts": { | |
"start": "node server.js", | |
"gcp-build": "npm run build", | |
"build": "tsc server.ts" | |
}, | |
"author": "Steren <steren@google.com>", |
NewerOlder