This file contains hidden or 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 | |
# Extract common file formats | |
# Display usage if no parameters given | |
if [[ -z "$@" ]]; then | |
echo " ${0##*/} <archive> - extract common file formats)" | |
exit | |
fi | |
# Required program(s) |
This file contains hidden or 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 | |
# Search file(s) for keyword | |
# Display usage if no parameters given | |
if [[ -z "$@" ]]; then | |
echo -e " ${0##*/} <string> <file/path> - search recursively for keyword in files" | |
exit | |
fi | |
if [ -z "$2" ]; then |
This file contains hidden or 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 | |
# Output file without comments or blanklines | |
# Display usage if no parameters given | |
if [ -z $1 ]; then | |
echo " ${0##*/} <*c> <filename> - print file w/o comments/blanklines - (c)lipboard" | |
exit 1 | |
fi | |
case $1 in |
This file contains hidden or 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 | |
# Running program search | |
ps aux | grep --color=always -i "$@" | grep -v grep | grep -v "$0" |
This file contains hidden or 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 | |
# Download trailers from Apple website | |
saveloc="~/Desktop" | |
# Usage if no parameters given | |
if [[ -z $@ ]]; then | |
echo " atget <apple-trailer-url>"; exit | |
fi |
This file contains hidden or 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 | |
# Command line calculator | |
# Display usage if no parameters given | |
if [ -z "$@" ]; then | |
echo " ${0##*/} <input> <*decimals> - command line calculator (-h for examples)" | |
exit | |
fi | |
# Decimal to be carried out to (uses four unless value is given) |
This file contains hidden or 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 | |
# Kill original g9led-random-color loop, run again | |
case "$1" in | |
resume | thaw ) | |
killall -9 g9led-random-color | |
export DISPLAY=:0 | |
su -c - todd /home/todd/.scripts/others/g9led-random-color & | |
;; | |
esac |
This file contains hidden or 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
[Desktop Entry] | |
Encoding=UTF-8 | |
Type=Application | |
Name=Logitech G9 Mouse LED Random Color Changer | |
Comment=Change G9 mouse color as specific intervals | |
Exec=/home/todd/.scripts/others/g9led-random-color | |
Icon=mouse | |
StartupNotify=false | |
Terminal=false | |
Hidden=false |
This file contains hidden or 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 | |
# Change Logitech G9 mouse led color to random color after specified period | |
# Minutes until change | |
minutes=10 | |
MINUTES=$(($minutes*60)) | |
# Generic array of colors | |
color=(000033 000066 000099 003300 006600 00CC00 00FF33 330000 330033 330066 | |
333300 336600 33CC33 33FF00 33FF33 660000 660033 6600CC 6600FF 66FF00 66FF33 | |
99FF00 99FF33 CC3300 CCCC00 CCFF00 CCFF33 FF0000 FF0033 FF0066 FF0099 FF3300 |
This file contains hidden or 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 | |
# Define span of multiple folders and join mp3s inside - useful for audio that | |
# spans more than one CD | |
# Display usage if no parameters given | |
if [[ -z "$@" ]]; then | |
echo " ${0##*/} <dir1> <dir2> <filename>.mp3 - folder span mp3 join" | |
exit | |
fi |