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 | |
file=/tmp/desktop-`date +%s`.png | |
echo -n "Capturing image in ... " | |
for i in {3..1} | |
do | |
echo -n "$i ... " | |
sleep 1 | |
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/sh | |
if [ -z "$1" -o ! -f "$1" ] | |
then | |
echo "you must specify a valid file" >&2 | |
exit 1 | |
fi | |
curl --data-urlencode js_code@"$1" \ | |
-d compilation_level=SIMPLE_OPTIMIZATIONS \ |
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/sh | |
if [ -z "$1" -o ! -f "$1" ] | |
then | |
echo "you must specify a valid file" >&2 | |
exit 1 | |
fi | |
curl --post301 --post302 -s -L \ | |
--data-urlencode input@"$1" \ |
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 | |
dest="$(readlink -f "$1")" | |
shift | |
if [ ! -d "$dest" ] | |
then | |
echo "$dest is not a valid directory" >&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
#!/bin/bash | |
IMG_DIRECTORY="${HOME}/.random_wallpaper" | |
function setit() { | |
fbsetbg -a "$(readlink -f "$1")" | |
gsettings set org.gnome.desktop.background picture-uri "file://$(readlink -f "$1")" | |
} | |
function flik() { |
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 | |
# Assuming you name the file pushover.sh, place somewhere within your $PATH, then chmod +x /path/to/pushover.sh | |
# Invoke with: pushover.sh [-d device_name] [-t Title] [-u Url] [-ut URL Title] [-p] [-ts timestamp] "notifcation text" | |
token="" | |
user="" | |
test -f ~/.pushover && source ~/.pushover # Put your API token and user key here |
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 | |
if [ -z "$1" ] | |
then | |
cat | |
exit | |
fi | |
tmp=$(mktemp -t addTag.XXXXXX) |
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 | |
# Now included in https://github.com/goodevilgenius/fortune-drj/ | |
DIR="${HOME}/.fortune/files" | |
FILE="quotes-$(date +%Y-%m)" | |
quote=`mktemp` | |
[ ! -d "$DIR" ] && mkdir -p "$DIR" |
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/sh | |
function GetNext() { | |
CURR=$(wmctrl -d | grep '^[[:digit:]]*[[:blank:]]*\*' | sed 's/^\([[:digit:]]*\).*/\1/') | |
LAST=$(wmctrl -d | tail -1 | sed 's/^\([[:digit:]]*\).*/\1/') | |
TOTAL=$(expr $LAST + 1) | |
NEXT=$(expr $(expr $CURR + 1) % $TOTAL) | |
echo $NEXT | |
} |
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/sh | |
while [ "$#" -ne 0 ]; do | |
EXT="${1##*.}" | |
FILENAME=`basename "$1" .${EXT}` | |
TMP=`mktemp` | |
ffmpeg -i "$1" -s 320x240 -vcodec xvid -an "${TMP}.avi" | |
ffmpeg -i "$1" -vn "${TMP}.wav" |
OlderNewer