Skip to content

Instantly share code, notes, and snippets.

View ivanvanderbyl's full-sized avatar
🏝️

Ivan Vanderbyl ivanvanderbyl

🏝️
View GitHub Profile
[{"id":"1","name":"Sky Diving","morts":10},{"id":"2","name":"Motocycling","morts":10},{"id":"3","name":"Drink Driving","morts":15},{"id":"4","name":"Walking","morts":1}]
@ivanvanderbyl
ivanvanderbyl / CloudSQL-vs-Crunchy-vs-AlloyDB.md
Last active July 26, 2022 23:30
Benchmarks comparing Postgres hosting options on GCP using pgbench.

All tests conducted in us-central1 on GCP from an instance running in us-central1-a

Initialized with:

pgbench -i --foreign-keys -s 100

Tests run with:

package ptr
// Safe reads the point and returns the zero value of the type of
// the pointer is nil, otherwise it returns the value of the pointer.
// Usage:
// ptr.Safe(obj.SomePointerField)
func Safe[T any](v *T) T {
if v == nil {
return *new(T)
}
const path = require('path')
const semver = require('semver')
const fs = require('fs')
const prettier = require('prettier')
function main() {
let manifest = path.resolve('./public/manifest.json')
let manifestData = require(manifest)
let prevVersion = manifestData.version
// Stub out browser interface
interface Browser {
wait(_: any): Promise<void>
fill(selector: string, text: string): Promise<void>
}
export interface StepBase {
(stepName: string, options: StepOptions, testFn: TestFn): void
(stepName: string, testFn: TestFn): void
(stepName: string, ...optionsOrFn: any[]): void

This is a test of inline code

{
"firstName": "Teddy",
"lastName": "Smith",
"mobile": "${Random(0000000000,9999999999)}",
"email": "${RandomString(10,abcdefghijklmnopqrstuvwxyz1234567890)}@domain.ext",
"currencyCode": "AUD",
"currentMembershipStatus": "LVL 1 Member"
}
{
"firstName": "Teddy",
"lastName": "Smith",
"mobile": "0470123766",
"email": "user@domain.ext",
"currencyCode": "AUD",
"currentMembershipStatus": "LVL 1 Member"
}
o.a.j.p.h.s.HTTPHC4Impl$6: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {s}->https://flooded.io:443: The target server failed to respond
o.a.j.p.h.s.HTTPHC4Impl$6: I/O exception (java.net.SocketException) caught when connecting to {s}->https://flooded.io:443: Broken pipe (Write failed)
const puppeteer = require('puppeteer');
const { expect } = require('chai');
describe('Duck Duck Go search using basic Puppeteer', () => {
let browser;
let page;
beforeEach(async () => {
browser = await puppeteer.launch();