cd <dir>
git log . | grep -E "^commit\ [a-z0-9]{40}$" | wc -l
FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
Moved to git repository: https://github.com/denji/golang-tls
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
version: "3"
services:
zookeeper:
image: 'wurstmeister/zookeeper:latest'
ports:
- '2181:2181'
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
#!/bin/bash | |
# https://www.starkandwayne.com/blog/bash-for-loop-over-json-array-using-jq/ | |
# how to run | |
# chmod u+x loop-over-json.sh | |
# ./loop-over-json.sh | |
sample='[{"name":"foo"},{"name":"bar"}]' | |
for row in $(echo "${sample}" | jq -r '.[] | @base64'); do | |
_jq() { |
A gist copied from kapeli page
Integer Comparison | |
---|---|
-eq |
is equal toif [ "$a" -eq "$b" ] |
-ne |
is not equal toif [ "$a" -ne "$b" ] |
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
#!/bin/zsh | |
# To make the command line version of Privileges more accessible so that it can be run as part of a script | |
# For Privileges v1.5.2 (1195) | |
ln -s /Applications/Privileges.app/Contents/Resources/PrivilegesCLI /usr/local/bin/admin | |
# Usage | |
# admin --add | |
# admin --remove |