This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Install cloudflared using homebrew: | |
brew install cloudflare/cloudflare/cloudflared | |
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
proxy-dns: true | |
proxy-dns-upstream: | |
- https://1.1.1.1/dns-query | |
- https://1.0.0.1/dns-query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", | |
"Country": "Afghanistan", | |
"ISO": "AF", | |
"Format": "NNNN", | |
"Regex": "^\\d{4}$" | |
}, { | |
"Note": "With Finland, first two numbers are 22.", | |
"Country": "Åland Islands", | |
"ISO": "AX", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function product() { | |
var args = Array.prototype.slice.call(arguments); // makes array from arguments | |
return args.reduce(function tl (accumulator, value) { | |
var tmp = []; | |
accumulator.forEach(function (a0) { | |
value.forEach(function (a1) { | |
tmp.push(a0.concat(a1)); | |
}); | |
}); | |
return tmp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2008-10-17", | |
"Id": "Policy<UNIQUE_ID>", | |
"Statement": [ | |
{ | |
"Sid": "Stmt<UNIQUE_ID>", | |
"Effect": "Deny", | |
"Principal": { | |
"AWS": "*" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -k -d1 * | sort -nr | cut -f2 | xargs -d '\n' du -sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find head commit | |
git reflog | |
# now reset hard - where N is the head commit found in the reflog | |
git reset --hard HEAD@{N} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff |