^-?([0-8]?[0-9]|90)(\.[0-9]{1,10})$
- 56.3847
- -56.387
import * as pulumi from "@pulumi/pulumi"; | |
import * as gcp from "@pulumi/gcp"; | |
const chromaApiKey = new pulumi.Config("chroma").requireSecret("apiKey"); | |
const zone = gcp.config.region || <your preferred region>; | |
// Create a new secret for Chroma API key. | |
const chromaApiKeySecret = new gcp.secretmanager.Secret( | |
"chroma-api-key-secret", | |
{ |
# We will use .githooks as hooks path but you can use your own | |
mkdir .githooks | |
# Add the pre-commit formatting hook | |
cat >>.githooks/pre-commit <<EOF | |
trunk fmt | |
EOF | |
# Add pre push linting hook | |
cat >>.githooks/pre-push <<EOF |
type NestedMap<V> = { [key: string]: V | NestedMap<V> }; | |
let myObj: NestedMap<number> = {} //valid | |
myObj = {a: 5} //valid | |
myObj = {a: 'sdfsdf'} //invalid | |
myObj = {a: 5, b: { c: 2 }} //valid | |
myObj = {a: 5, b: { c: 'foobar' }} //invalid | |
myObj = {a: 5, b: { c: { d: { e: { f: { g: 5}}}}}} //valid |
type PromisedReturnType<T extends (...args: any) => any> = T extends (...args: any[]) => PromiseLike<infer R> ? R : any | |
//usage | |
async function f1() { | |
return "Value"; | |
} | |
async function f2(): Promise<number> { | |
return Promise.resolve(5); | |
} |
{ | |
"Hook Widget": { | |
"prefix": "hookw", | |
"body": [ | |
"class ${1:WidgetName} extends HookWidget {", | |
"\t@override", | |
"\tWidget build(BuildContext context) {", | |
"\t\treturn ${2};", | |
"\t}", | |
"}", |
{ | |
"Freezed Class": { | |
"prefix": "frz", | |
"body": [ | |
"import 'package:freezed_annotation/freezed_annotation.dart';", | |
"", | |
"part '${1/(.*)/${1:/downcase}/}.freezed.dart';", | |
"part '${1/(.*)/${1:/downcase}/}.g.dart'", | |
"", | |
"@freezed", |
List _decode(String input) { | |
var list=input.codeUnits; | |
List lList = new List(); | |
int index=0; | |
int len=input.length; | |
int c=0; | |
List<LatLng> positions = new List(); | |
// repeating until all attributes are decoded | |
do { | |
var shift=0; |