Skip to content

Instantly share code, notes, and snippets.

View get-teh-clip.sh
#!/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"
View containerhelper
#!/bin/bash
#This is free and unencumbered software released into the public domain.
#Because this script needs root to do some things, excessive amounts of
#checking have been done to terminate the script if anything fails.
#Read all instructions very carefully. When it asks to type "yes", it must be
#all uppercase or it will fail.
@jadedgnome
jadedgnome / utox-keepalive.sh
Created Aug 9, 2014
script to stop uTox from dying when I close it
View utox-keepalive.sh
#!/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 Aug 29, 2015
rename the ouputted html file from redditPostArchiver with the reddit thread title. https://github.com/sJohnsonStoever/redditPostArchiver
View gist:53c55ed450bad9240231
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
}
View 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
}
View gist:312649a924d85aa1b765
#!/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
View copyPBar.sh
alias cp='rsync -p --progress'
# copy with progressbar
View .zshrc
alias cp="rsync -avrP --progress"
alias aria2c="aria2c -s 16 -x 16 -k 1M"
alias nl="sudo lsof -i | grep -i listen"
View commands.sh
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
View sfdl.sh
#!/bin/bash
if [[ $1 == "" ]]; then
echo "Usage: $0 <downloadurl>"; exit
fi
aria2c -v 2>&1 >/dev/null || (echo "aria2 is not installed"; exit)
url=`echo $1 | cut -f1 -d"?"`
cmd="aria2c"
for mirror in `echo "kent freefr garr switch netcologne surfnet heanet iweb superb-dca3 superb-dca2 jaist tenet ufpt internode" | tr ' ' '\n'` ; do
cmd="${cmd} \"${url}?use_mirror=${mirror}\""
done
You can’t perform that action at this time.