Added all remaining gists.

This commit is contained in:
Miguel Astor
2023-06-21 21:40:51 -04:00
parent 22ff5bfa25
commit b0ca706a25
26 changed files with 892 additions and 0 deletions

1
hash.sh/README.md Normal file
View File

@@ -0,0 +1 @@
A little toy shell script inspired by Bitcoin mining.

13
hash.sh/hash.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
VAL="0"
while :
do
echo `cat $1` "$VAL" | sha256sum | sha256sum | grep "^0\{$2\}"
if [[ $? -eq 0 ]]
then
break
fi
VAL=`expr $VAL + "1"`
done