Skip to content

Instantly share code, notes, and snippets.

View TonyStark's full-sized avatar
🎯
Focusing

... TonyStark

🎯
Focusing
View GitHub Profile
@TonyStark
TonyStark / shredgui.sh
Last active March 8, 2021 20:58
Shred multiple files in linux with drag and drop gui
#!/bin/bash
zenity --title="Shred Files BOX" --text="Drag file to below box" --entry --width=600 | cut -c 8- | tr -d '\r' >> /tmp/shredfiles
IFS=$'\n' read -d '' -r -a filess < /tmp/shredfiles
for ((i=0;i<${#filess[@]};i++))
do
file=`python2 -c 'import sys, urllib; print urllib.unquote(sys.argv[1])' "${filess[$i]}"`
shred -uvz "$file" > /dev/null 2>&1
done
rm /tmp/shredfiles
@TonyStark
TonyStark / gist:f0b4fc34b31d326434d2ea08b894065d
Created December 28, 2019 08:42
parallel 50 files download
#!/bin/bash
for a in {1487054155500..1487055000000}
do
if [ $((a%50)) = 0 ]
then
curl -s -I http://link.com/updateOTA_$((a)).zip | head -n1 &
curl -s -I http://link.com/updateOTA_$((a+1)).zip | head -n1 &
curl -s -I http://link.com/updateOTA_$((a+2)).zip | head -n1 &
curl -s -I http://link.com/updateOTA_$((a+3)).zip | head -n1 &
curl -s -I http://link.com/updateOTA_$((a+4)).zip | head -n1 &