git.slaskete.net
/
einar-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4111dae
)
Fixed silly typo in comment
author
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Sun, 1 Jun 2014 21:59:32 +0000
(23:59 +0200)
committer
Einar Jørgen Haraldseid
<einar@haraldseid.net>
Sun, 1 Jun 2014 21:59:32 +0000
(23:59 +0200)
imgurgame.bash
patch
|
blob
|
history
diff --git
a/imgurgame.bash
b/imgurgame.bash
index d1f9fdd4688594de2bccd1dce5689d2e746d1550..88af62077db5e9cb981aa236deb9045c08f8e85f 100755
(executable)
--- a/
imgurgame.bash
+++ b/
imgurgame.bash
@@
-5,7
+5,7
@@
readonly BROWSER="google-chrome"
# Create a random imgur url that may or may not be valid
imgururl() {
# Create a random imgur url that may or may not be valid
imgururl() {
- # 1/3
%
chance for length of 5, 6 or 7 length string
+ # 1/3 chance for length of 5, 6 or 7 length string
STRLN=$((5 + ${RANDOM} % 3))
local ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${STRLN} | head -n 1)
echo "http://i.imgur.com/${ID}.jpg"
STRLN=$((5 + ${RANDOM} % 3))
local ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${STRLN} | head -n 1)
echo "http://i.imgur.com/${ID}.jpg"