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
alias cp='rsync -p --progress' | |
# copy with progressbar |
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
#!/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 |
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
#!/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 | |
} |
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
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 | |
} |
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/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 |
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/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 |
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/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" |
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
# 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 |
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
retry(){ | |
# FROM http://redd.it/25tgqg | |
local delay=1 n | |
if ! [[ $1 = *[^0-9]* ]]; then | |
if (($1 > 0)); then | |
delay=$1 | |
fi | |
shift | |
fi |
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/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |