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 | |
# Common makepkg building tasks | |
mntr_info="Gen2ly <[email protected]>" | |
usage () { | |
echo " ${0##*/} <option> - common makepkg building tasks | |
b - build package (install dependencies if required) | |
m - update md5sums | |
r - remove previous build directories |
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 | |
# References for common Arch Linux package management tasks | |
# Required program(s) | |
req_progs=(pacaur) | |
for p in ${req_progs[@]}; do | |
hash "$p" 2>&- || \ | |
{ echo >&2 " Required program \"$p\" not installed."; exit 1; } | |
done |
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 | |
# Create a github gist repository for sharing scripts/configs on blog | |
# Base directory, repository parent directory | |
base_dir=""$HOME"/" | |
repo_par=""$HOME"/.github-gist/" | |
# File list (File list order must match repository order) | |
files=('/home/todd/.scripts/others/ghsync-script' | |
'/home/todd/.scripts/vault/unity-effects' |
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 | |
# Paste contents of Xorg clipboard to a file from the command line | |
filename=$@ | |
pasteinfo="clipboard contents" | |
# Display usage if no parameters given | |
if [[ -z "$@" ]]; then | |
echo " ${0##*/} <filename> - paste contents of context-menu clipboard to file" | |
exit |
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 | |
# Copy file or pipe to Xorg clipboard | |
# Required program(s) | |
req_progs=(xclip) | |
for p in ${req_progs[@]}; do | |
hash "$p" 2>&- || \ | |
{ echo >&2 " Required program \"$p\" not installed."; exit 1; } | |
done |
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 | |
# Background a terminal command | |
# Add 'complete -cf bgcmd' to ~/.bashrc for command completion | |
nohup "$@" &> /dev/null & |
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 | |
# Free unused memory | |
flush_mem () { | |
sudo sync | |
echo 3 | sudo tee /proc/sys/vm/drop_caches | |
} | |
echo -e "\nMemory usage before purge:\n" && free -m |
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 | |
# Create new profile and transfer settings (fixes certain | |
# problems when there are errors in Firefox settings). | |
ffsettingsdir=~/.mozilla/firefox/ | |
# Setting files to restore (files to copy): | |
# (http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox) | |
files="content-prefs.sqlite | |
cookies.sqlite | |
formhistory.sqlite |
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 | |
# Backup configurations | |
# Backup destination directory | |
#bckp_dest="/home/todd/Desktop" | |
bckp_dest="/run/media/todd/Backup/backup-configs" | |
# Backup name | |
comp="${HOSTNAME}" # Computer name | |
dist="arch" # Distro |
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 | |
# Archive and compress file and folders | |
# Display usage if no parameters given | |
if [[ -z "$@" ]]; then | |
#echo " ${0##*/} <file/dir> <*file/dir2> <*name>.tar.xz - archive file/folders" | |
echo " ${0##*/} <file/dir> <*file/dir2> - archive and compress files and dirs" | |
exit | |
fi |