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 | |
:<<END_DOC | |
blocklist updater - for transmission | |
Written by raidzero for linux | |
BLOCKLIST_HOME is the directory where transmission keeps its blocklists | |
END_DOC | |
BLOCKLIST_HOME=~/.config/transmission/blocklists |
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 | |
# switch all apps playing sound to a given device. | |
# usage: paswitch.sh [HEADPHONES|SPEAKERS] (really meant to be bound a key shortcut) | |
# these are the sink names of the devices we want to use | |
HEADPHONES="alsa_output.usb-FiiO_DigiHug_USB_Audio-01-Audio.analog-stereo" | |
SPEAKERS="alsa_output.pci-0000_00_1b.0.analog-stereo" | |
# get a list of ID's of everything playing sound | |
INPUTS=`pacmd list-sink-inputs | grep index | cut -d ':' -f2 | sed 's/^ *//g'` |
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 | |
# cpu core temp monitor tool for my i7 4930k | |
SENSOR="coretemp-isa-0000" | |
COLUMNS=`tput cols` | |
if [ "$COLUMNS" -lt 106 ]; then | |
echo "Terminal needs to be 106 columns wide for hottestcore to work correctly." | |
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/sh | |
# this script will print internal game name and ID to the screen for gamecube/wii games and download artwork | |
ARTWORK_DIR=~/storage/ROMs/artwork | |
function die() | |
{ | |
rm /tmp/game{Name,ID,WBFS} &> /dev/null | |
echo $1 | |
exit $2 |
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 | |
CHOICE=$1 | |
HIBERNATE=$2 | |
if [ "$CHOICE" == 9999 ]; then | |
STAYOFF="STAYOFF" | |
fi | |
if [ -z "$HIBERNATE" ]; then | |
#su raidzero -c '/home/raidzero/bin/sess.sh save' |
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/python | |
import os | |
"""Pipe Menu to launch VirtualBox Machines""" | |
# build the list of VM's | |
VM_LIST = os.listdir("/home/raidzero/.VirtualBox/Machines") | |
print """<openbox_pipe_menu> |
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 | |
FILE=~/.tmp/kbdfile | |
DELAY=$1 | |
RATE=$2 | |
DEFAULTDELAY=`xset q | grep "auto repeat delay" | awk '{print $1" "$2" "$3" "$4}' | cut -d ':' -f2 | sed 's/ //g'` | |
DEFAULTRATE=`xset q | grep "repeat rate" | awk '{print $7}'` |
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 | |
# USAGE: weather.sh [NULL|both|forecast] | |
LOCATION_URL="http://weather.yahooapis.com/forecastrss?p=USCO0105&u=" #Denver | |
WEATHER=`curl -s "$LOCATION_URL" | grep "F<BR" | awk -F ' F<BR' '{print$1}'` | |
TOMORROW=`date --date="tomorrow" +%a` | |
FORECAST=`curl -s "$LOCATION_URL" | grep -oE "^[A-Z][a-z]{2} - .*-?[0-9]{1,3}" | grep "^$TOMORROW" | sed -r 's_High: \<(-?[0-9]{1,3})\> Low: \<(-?[0-9]{1,3})\>_\2\/\1_'` | |
FORECAST=`echo $FORECAST | sed -r ' \ |
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 | |
# get the last boot time and display it in 12 hour format | |
# USAGE: lastboot.sh [date|time|both] | |
LASTBOOT_LINE=`last | grep reboot | head -n 1` | |
DATE=`echo $LASTBOOT_LINE | awk '{print$5,$6,$7}'` | |
TIME=`echo $LASTBOOT_LINE | awk '{print$8}'` | |
#convert to 12 hour | |
HOUR=`echo $TIME | cut -d : -f1` |
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
/* | |
* Uses stdin to evaluate a statement such as "2.5.3" <= 2.4". Returns strings "True" or "False" to terminal | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define DEBUG 0 |
OlderNewer