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 | |
# Create a github repository for scripts | |
# Github repository name to use, Github repository address | |
gh_rp_nm="github_scripts" | |
gh_rp_dr="[email protected]:Gen2ly/scripts.git" | |
# Base directory, repository directory | |
base_dir=""$HOME"/.scripts/" | |
repo_dir=""$HOME"/.github-scripts/" |
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
# Schedule to run shell commands (dcron) | |
# user: todd | |
# DO NOT EDIT THIS FILE MANUALLY! USE crontab -e INSTEAD | |
# man 1 crontab for acceptable formats | |
# <mm> <hh> <DD> <MM> <dow> <tags and command> # dow: 0-6, Sun=0 | |
# <@freq> <tags and command> | |
@weekly /home/todd/.scripts/others/github-sync-configs | |
@weekly /home/todd/.scripts/others/github-sync-scripts |
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 | |
# Toggle compositing effects of the Unity desktop | |
set -x | |
unity_2d="unity-2d-panel unity-2d-shell unity-2d-places unity-2d-launcher unity-2d-spread " | |
#unity_2d="unity-2d-panel unity-2d-shell" | |
start_2d() { | |
# Replace window manager |
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 | |
# Power management as a regular user | |
case $1 in | |
shutdown | S ) | |
echo " Shutting Down..." | |
dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" \ | |
/org/freedesktop/ConsoleKit/Manager \ | |
org.freedesktop.ConsoleKit.Manager.Stop > /dev/null ;; | |
restart | 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
# bash interactive shell settings and additional specified commands | |
# Check for an interactive session | |
[ -z "$PS1" ] && return | |
# Custom Prompt | |
set_prompt_style () { | |
local bldpur='\e[1;35m' # Purple | |
local bldblu='\e[1;34m' # Blue | |
local bldblk='\e[1;30m' # Black - Bold |
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 | |
# Rip CDs with given presets (requires cd-discid, sendmail ) | |
# Audio directory | |
aud_dir=~/Audio | |
# Sub-directory selection | |
printf "Select directory to rip disk to:\n" | |
select aud_sub_dir in "$aud_dir"/*/ | |
do |
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 | |
# Define normalization levels in mp3s (album-specifically) | |
audio_dir=~/Audio # Audio directory | |
sub_dir_inc=(Audiobooks Music Podcasts) # Sub-directories good to keep seperate | |
cd "$audio_dir" | |
for d in "${sub_dir_inc[@]}"; do | |
# -a keep gain even relative to albums, -k lower to not clip, -T modify orgin | |
# -d adjust volume by decibel amount (volume low on PSP) |
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 | |
# Description of script | |
# Required program(s) | |
req_progs=(prog1 prog2) | |
for p in ${req_progs[@]}; do | |
hash "$p" 2>&- || \ | |
{ echo >&2 " Required program \"$p\" not installed."; exit 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/bash | |
# Description of script | |
# Display usage if no parameters given | |
if [[ -z "$@" ]]; then | |
echo " ${0##*/} <input> - description" | |
exit | |
fi | |
# Required program(s) |
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 | |
# Create HTML-colored code from Vim syntax highlighting | |
filename=$@ | |
background=light | |
colorscheme=beauty256 | |
#colorscheme=simple256 | |
#colorscheme=peaksea | |
# Display usage if no parameters given |
OlderNewer