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://gist.github.com/Juraci/d1414f7c780e2dbe8204 | |
# modified by klkyy2020(klkyy2020 at 163 dot com) | |
red=$(tput setaf 1) | |
green=$(tput setaf 2) | |
yellow=$(tput setaf 3) | |
myexit() { | |
reason=$1 |
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
// validRange returns false if 0 is between 1 or starts with 0 | |
// otherwise returns true | |
func validRange(val byte) bool { | |
v := val | |
foo := byte(128) | |
firstBit := true | |
zeroAppears := false | |
if v == 0 { | |
return false | |
} |