start new:
tmux
start new with session name:
tmux new -s myname
| // Using Azure Resource Graph, fetch Virtual Machine Records | |
| use azure_identity::{ClientSecretCredential, TokenCredentialOptions}; | |
| use std::{env, sync::Arc}; | |
| use std::any::Any; | |
| use std::borrow::Cow; | |
| use std::future::IntoFuture; | |
| use std::str::FromStr; | |
| use azure_core::{AppendToUrlQuery, ClientOptions, ExponentialRetryOptions, new_http_client, RetryOptions}; |
| ################################################################# | |
| # = This script transfers bash history to zsh history | |
| # = Change bash and zsh history files, if you don't use defaults | |
| # | |
| # = Usage: ruby bash_to_zsh_history.rb | |
| # | |
| # = Author: Ankit Goyal | |
| ################################################################# | |
| # change if you don't use default values |
UNLOGGED table. This reduces the amount of data written to persistent storage by up to 2x.WITH (autovacuum_enabled=false) on the table. This saves CPU time and IO bandwidth
on useless vacuuming of the table (since we never DELETE or UPDATE the table).COPY FROM STDIN. This is the fastest possible approach to insert rows into table.time timestamp with time zone is enough.synchronous_commit = off to postgresql.conf.| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "golang.org/x/oauth2" | |
| "golang.org/x/oauth2/jwt" | |
| storage "google.golang.org/api/storage/v1" | |
| "os" | |
| ) |
| My name is {{.Name}} and I'm {{.Age}} years old!! |
| package onboarding_test | |
| import ( | |
| "crypto/tls" | |
| "log" | |
| "net" | |
| "net/http" | |
| "testing" | |
| ) |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/gob" | |
| "fmt" | |
| "log" | |
| ) | |
| func main() { |
| --- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
| --- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
| -- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
| ------------ | |
| -- Basics -- | |
| ------------ | |
| -- Get indexes of tables |