Skip to content

Instantly share code, notes, and snippets.

venam

Block or report user

Report or block venam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@venam
venam / fetch_all_hosts.sh
Created Jul 12, 2018
hosts block autofetcher
View fetch_all_hosts.sh
#!/bin/bash
# fetch the new block list
wget 'https://v.firebog.net/hosts/lists.php?type=all' -O list_all
# reset the old hosts directory
rm -r all_hosts
mkdir all_hosts
# read the file and download into the all_hosts directory
while read a; do
@venam
venam / watermark.sh
Last active Nov 26, 2015
watermark a bunch of image files in a dir
View watermark.sh
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "Usage: $0 dir text" >&2
exit 1
fi
# 1275x1650 - the size of the A4 images
dir=$1
text=$2
@venam
venam / pdf_to_images.sh
Created Nov 25, 2015
convert a list of pdfs to images of good quality
View pdf_to_images.sh
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "Usage: $0 pdfs" >&2
exit 1
fi
for pdf in "$@"
do
echo "Converting $pdf to images"
pages="$( pdfinfo "$pdf" |grep Pages | sed -e 's/Pages:\( \)\+//')"
@venam
venam / converter.sh
Last active Feb 2, 2017
Convert flv to mkv
View converter.sh
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "usage: ${0} <extension> <replace>"
exit 1
fi
for f in *.${1}
do
newname="${f%${1}}${2}"
You can’t perform that action at this time.