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/busybox sh | |
# Original code, slow, not sh-compatible | |
hashcode() { | |
local hash=0 | |
local str="$1"X | |
while [ -n "$str" ]; do | |
ch="${str:0:1}" | |
hash=$(( ($hash * 173 + $(printf '%d' "'$ch")) % 256 )) | |
str="${str:1}" | |
done |
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/sh | |
title="mp3skull downloader" | |
put() { eval 'printf %s\\n "$'"$1"'"'; } | |
music_dir=$(xdg-user-dir MUSIC || put HOME) | |
cleanup() { | |
ret=$? | |
rm -f -- "$cookie_jar" |
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/sh | |
# Requires node.js: sudo pacman -Sy nodejs | |
if [ $# -lt 1 ]; then | |
echo "Usage: $(basename "$0") FILE [FILE...]" >&2 | |
exit 1 | |
fi | |
for f in "$@"; do | |
d=$(node -pe "JSON.parse(process.argv[1]).files[0].url" "$(curl -sS --progress-bar -F "files[]=@$f" http://pomf.se/upload.php)") |
NewerOlder