When working on Windows with Docker, Linux, etc, your files should be standardized to LF. This command only needs to be run once:
git config --global core.autocrlf input
#!/bin/sh | |
# Wait for a file to exist | |
# Modeled off this script | |
# https://gist.github.com/gregberns/7e1254209860632f7a1bf9aa7c7638ee | |
TIMEOUT=15 | |
QUIET=0 | |
echoerr() { |
#!/bin/sh | |
TIMEOUT=15 | |
QUIET=0 | |
echoerr() { | |
if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi | |
} | |
usage() { |
When working on Windows with Docker, Linux, etc, your files should be standardized to LF. This command only needs to be run once:
git config --global core.autocrlf input
Tags: Azure, Managed Identity, SQL Server Access Token, Managed Service Identity, SQL Server Authentication, App Registrations
This document will outline the concepts needed to connect to a "Secure" Azure SQL Server database, both from within Azure and outside of Azure. It also provides code snippets to demonstrate what is involved.
Today's best practice is to access SQL databases with OAuth tokens. To connect to an Azure SQL DB, you get an OAuth token, then supply it when connecting to the SQL Database. Getting the OAuth token is different whether you're accessing it in Azure or outside Azure.
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
# curl ~~Get gist raw url~~ > setup.sh | |
# chmod +x ~/setup.sh | |
# ~/setup.sh | |
GIT_USERNAME=________ | |
GIT_EMAIL=________ | |
GITHUB_ACCOUNT_NAME=________ | |
MAC_USERNAME=________ | |
MAC_MACHINE_NAME=________ |
jq
can filter keys with dashes (-
), but that requires special syntax: [\"field-name\"]
Input:
echo '{"the-long-field-name":"true"}' | jq ". | select(.[\"the-long-field-name\"] != null)"
Output:
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |