Code!
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 | |
# set -o allexport | |
# source .env | |
# set +o allexport | |
while read line; | |
do | |
if [[ $line == "#"* ]] || [[ $line == "" ]] || [[ $line == ";"* ]] ; | |
then | |
echo "skipping comment or empty line:" $line; |
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 BG(N){ | |
// https://www.w3resource.com/javascript-exercises/javascript-math-exercise-3.php | |
// https://codepen.io/w3resource/pen/Qxgpzw | |
// console.log(N, parseInt(N, 10).toString(2)); // N.toString(2) does the trick too | |
var k = parseInt(N, 10).toString(2); | |
var t = Array.from(k) | |
// console.log(t, t.indexOf('0')); | |
var r = new Array; |