jq will sort (-S) the whole file (.) and compare STDOUT (<()) with diff
diff <(jq -S . A.json) <(jq -S . B.json)
| import requests | |
| from bs4 import BeautifulSoup | |
| import getpass | |
| import csv | |
| import argparse | |
| import sys | |
| LOGIN_URL = "https://news.ycombinator.com/login" | |
| UPVOTED_URL = "https://news.ycombinator.com/upvoted" | |
| FAVORITES_URL = "https://news.ycombinator.com/favorites" |
jq will sort (-S) the whole file (.) and compare STDOUT (<()) with diff
diff <(jq -S . A.json) <(jq -S . B.json)
I hereby claim:
To claim this, I am signing this object:
| const matrix = [ | |
| [1, 2, 3], | |
| [4, 5, 6], | |
| [7, 8, 9] | |
| ]; | |
| const rotateMatrix = (inputMatrix: Array<Array<Number>>, rotateBy: number) => { | |
| let outputMatrix = new Array(inputMatrix.length).fill([]); | |
| if (rotateBy === 0) { |
FWIW, here's what I just did on my (Arch) Linux machine:
$ for f in /etc/ssl/certs/*.pem; do sudo ln -sfn "$f" /etc/ca-certificates/trust-source/blacklist/; done
$ sudo update-ca-trust
This will block all currently installed CAs (as well as double-block some, but that doesn't really matter). You then need to add them back in.Restart your browser, and go to websites you access frequently (change them to https:// if necessary). Click the (broken) padlock and read off what CA they used; remove the corresponding .pem file from the blacklist directory. Some might be signed by intermediate certs and thus hard to find, but SSL Hopper has a great chain inspection tool at https://www.sslshopper.com/ssl-checker.html you can use to identify the topmost CA cert you need to whitelist.
After you're done, run sudo update-ca-trust again, and restart your browser. All normal sites should work, and you've gotten rid of ~160 root certs.
| At host machine: | |
| mkdir -p ~/.terminfo/r/ | |
| At client: | |
| scp /usr/share/terminfo/r/rxvt-unicode-256color user@remotehost:.terminfo/r/ |
| function replacer(match) { | |
| if(match.length === 2) { | |
| return match.split('').join('-'); | |
| } else { | |
| return '-'; | |
| } | |
| } | |
| function spinalCase(str) { | |
| return str.replace(/[_ ]|[a-z][A-Z]/g, replacer).toLowerCase(); |