Skip to content

Instantly share code, notes, and snippets.

View Weiyuan-Lane's full-sized avatar
🐈
Code. Code! CODE! CODE!!!!!!

Weiyuan Liu Weiyuan-Lane

🐈
Code. Code! CODE! CODE!!!!!!
View GitHub Profile
@Weiyuan-Lane
Weiyuan-Lane / v1_prompt.sh
Created July 2, 2023 05:58
V1 prompt script for testing
#!/bin/sh
promptGCPEntry(){
while true; do
read -p "Please input your Google Cloud Platform Project ID: " gcpProjectId
case $gcpProjectId in
"") echo "Please input a valid value.";;
* ) break;;
esac
done
package googletranslatewrapper
import (
"context"
"fmt"
"cloud.google.com/go/translate"
"github.com/weiyuan-lane/google-translate-api/internal/utils/errorhandlers"
)
@Weiyuan-Lane
Weiyuan-Lane / cloud_sql_vs_alloydb_vs_cloud_spanner_costs.md
Last active June 18, 2024 04:41
Comparing Cloud SQL vs AlloyDB vs Cloud Spanner costs
@Weiyuan-Lane
Weiyuan-Lane / cloud_sql_min_max_choices.md
Last active September 11, 2022 14:39
Cloud SQL - min and max sizing choices
Defined instance type Custom instance type
@Weiyuan-Lane
Weiyuan-Lane / cloud_sql_vs_alloydb_extensions.md
Last active September 11, 2022 12:07
Cloud Sql vs Alloydb, extensions support
Extensions Cloud SQL (PostgreSQL) AlloyDB
1 address_standardizer ✔️ ✔️
2 address_standardizer_data_us ✔️ ✔️
3 amcheck ✔️ ✔️
4 auto_explain ✔️ ✔️
5 bloom ✔️
6 btree_gin ✔️ ✔️
7 btree_gist ✔️ ✔️
8 citext ✔️ ✔️
@Weiyuan-Lane
Weiyuan-Lane / cloud_sql_vs_alloydb_vs_cloud_spanner.md
Last active December 5, 2024 18:55
Comparing Cloud SQL (PostgreSQL) vs AlloyDB vs Cloud Spanner
@Weiyuan-Lane
Weiyuan-Lane / simple_painless_scriping_agg.txt
Last active August 21, 2022 14:53
Painless scripting, simple aggregation example
GET /_search
{
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "message: \"This is a genre log entry!\"",
"analyze_wildcard": true
}
node_security_group_additional_rules = {
ingress_self_all = {
description = "Cluster API to node groups (Kubernetes Dashboard port only)"
protocol = "tcp"
from_port = 8443
to_port = 8443
type = "ingress"
source_cluster_security_group = true
}
}
async setAttributes(attrs: Object): Promise<void> {
return this.growthbookSingleton.then((growthbook: GrowthBook) => {
growthbook.setAttributes(attrs);
this.triggerUpdate();
})
}
async evalFeature<T extends FeatureValType>(featureKey: string): Promise<T | null> {
return this.growthbookSingleton.then((growthbook: GrowthBook) => {
const val = growthbook.evalFeature<T>(featureKey);