Skip to content

Instantly share code, notes, and snippets.

# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
#!/bin/bash
echo "file name"
read name
#both the 'start' and 'end' variables should be time stamps of the format hh:mm:ss
echo "start of clip"
read start
echo "end of clip"
@jadedgnome
jadedgnome / imagebam-dl.sh
Created August 9, 2014 15:33
download imagebam galleries
#!/bin/bash/
# usage : ./imagebam-dl.sh <URL>
for i in `curl -s "$1" |grep 'a href'| egrep -o "http.*" |grep /image/ | cut -d "'" -f1 | cut -d '"' -f1` ; do FOLDER=$(echo $1 | cut -d '/' -f 5) ; curl -s "$i" | grep 'img id' | grep -o "http.*" | cut -d '"' -f1 | xargs wget -nv -nc -P imagebam_"$FOLDER"/ ; done
@jadedgnome
jadedgnome / utox-keepalive.sh
Created August 9, 2014 19:06
script to stop uTox from dying when I close it
#!/bin/bash
# ORIGINALLY FROM : http://pastebin.mozilla.org/5879198
# http://www.reddit.com/r/linux/comments/2czjru/skype_for_linux_redesign_is_ugly_but_functional/cjkl0cl
for i in `wmctrl -l | grep uTox | awk '{ print $1 }'`
do
wmctrl -i -r $i -b remove,hidden,skip_taskbar
done
@jadedgnome
jadedgnome / gist:53c55ed450bad9240231
Last active August 29, 2015 14:05
rename the ouputted html file from redditPostArchiver with the reddit thread title. https://github.com/sJohnsonStoever/redditPostArchiver
ran(){
TITLE=$(curl --head -ILs http://redd.it/$1 |grep -i Location |grep -v /tb/| cut -d '/' -f 8)
SUBREDDIT=$(curl --head -ILs http://redd.it/$1 |grep -i location |grep -v /tb/| cut -d '/' -f 5)
python ~/bin/redditPostArchiver/archiver.py $1
mv $1.html $1_\[$SUBREDDIT\]_$TITLE.html
echo $PWD/$1_\[$SUBREDDIT\]_$TITLE.html
}
@jadedgnome
jadedgnome / clbin
Last active August 29, 2015 14:09 — forked from makefu/clbin
#!/usr/bin/env bash
# Upload text/images to clbin.com from the command line
# License: ISC http://www.isc.org/downloads/software-support-policy/isc-license/
clip() {
if command -v xclip &> /dev/null; then
xclip -selection clip <<< "$@"
elif command -v xsel &> /dev/null; then
xsel -b -i <<< "$@"
fi
}
#!/usr/bin/env bash
# Upload text/images to clbin.com from the command line
# License: ISC http://www.isc.org/downloads/software-support-policy/isc-license/
set -euf
clip() {
if command -v xclip &> /dev/null; then
xclip -selection clip <<< "$@"
elif command -v xsel &> /dev/null; then
xsel -b -i <<< "$@"
fi
alias cp='rsync -p --progress'
# copy with progressbar
@jadedgnome
jadedgnome / .zshrc
Last active August 29, 2015 14:11 — forked from xhacker/.zshrc
alias cp="rsync -avrP --progress"
alias aria2c="aria2c -s 16 -x 16 -k 1M"
alias nl="sudo lsof -i | grep -i listen"
ffmpeg -i some.mkv -acodec copy -vcodec copy some.mp4 #copy mkv to mp4 container - may not be compliant
ffmpeg -t 30 -i some.mkv -acodec copy -vcodec copy some.mp4 #create sample
ffmpeg -i some.mkv -acodec libfaac -ac 2 -vcodec copy some.mp4 #mp4 with downmixed audio (AAC @ 128kbit)
aria2c --bt-min-crypto-level=arc4 --bt-require-crypto=true --dht-listen-port=34450-34459 --listen-port=34460-34469