Skip to content

Instantly share code, notes, and snippets.

@anubhavsahoo
Last active January 4, 2017 07:08
Show Gist options
  • Save anubhavsahoo/1a721ec0df499f4171632069cc8cd30e to your computer and use it in GitHub Desktop.
Save anubhavsahoo/1a721ec0df499f4171632069cc8cd30e to your computer and use it in GitHub Desktop.
# any bash script that takes more than 5 mins to craft or google
#wget parallel / multi download
cat ../image-names | xargs -I {} echo "https://photos.net/photos/default/"{} | xargs -n1 -P16 wget
#wget a sitemap
wget --quiet http://www.xyz.com/sitemap.xml --output-document - | egrep -o "http?://[^<]+" | wget -i -
## then parse all urls
egrep -o "http?://[^<]+" sitemap-pt-p* | grep -vi schema | cut -c29- > ../all-posts-urls
#Grep for partial patterns
grep -Po "http://.*?jpg" index.html
#Generate Password and copy to clipboard
shuf /usr/share/dict/words | head -n4 | tr '\n' '-' |tr "'" '-' | sed "s/-$//" | xclip -sel -o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment