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 | |
set -e | |
set -x | |
# Root Access | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
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
# --- activate a virtualenv without the need of going through a series of | |
# paths | |
function venv { source $WORKON_HOME/$1/bin/activate; } | |
# --- create a virtualenv | |
function mkenv { virtualenv $WORKON_HOME/$1; venv $1; echo "$1" > ./.venv; } | |
# --- automagically load virtualenvs, based on the ".venv" file in the directory | |
# -- search for the ".venv" from the current directory and, if it can't be found, |
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
[user] | |
email = <your email> | |
name = <your name> | |
[gitreview] | |
username = <your username> | |
[alias] | |
newf = !bash -c 'git checkout -b feature/$0' | |
uploadf = !bash -c 'git push origin `git rev-parse --abbrev-ref HEAD`' | |
updatef = !bash -c 'git fetch && git merge master --no-ff' | |
gof = !bash -c 'git checkout feature/$0' |
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
echo Video4Roku Converter 1.0 by @maglovato | |
echo -------------------------------------- | |
filename=$(basename "$1") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
#avconv -i "$1" -c:v libx264 -c:a libvo_aacenc "/tmp/$filename.mp4" | |
avconv -i "$1" -c:v libx264 -c:a aac -strict experimental "/tmp/$filename.mp4" |
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
# | |
#http://askubuntu.com/questions/84483/how-to-completely-uninstall-java | |
# | |
java_version=`java -version 2>&1 | head -n 1 | awk -F"\"" '{print $2}'` | |
#Remove all the Java related packages (Sun, Oracle, OpenJDK, IcedTea plugins, GIJ): | |
sudo apt-get update | |
apt-cache search java | awk '{print($1)}' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e 'java-common' | xargs sudo apt-get -y remove | |
sudo apt-get -y autoremove |