Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# (ge)ntoo (pa)ckages - A generic, package tasks script for Gentoo Linux
# Required programs
req_prgs=(emerge euse sudo)
for prog in ${req_prgs[@]}; do
if ! hash "$prog" 2>&- ; then
echo >&2 ""${0##*/}": requires program: "$prog""
error=y ;fi ; done
[ "$error" = y ] && exit 1
@Gen2ly
Gen2ly / .vimrc
Last active August 29, 2015 13:57
colorscheme jellybeans
" Jellybeans colorscheme edits (not working)
"let g:jellybeans_overrides = {
"\ 'Normal': { 'ctermbg': '242' },
"\ 'CursorLine': { 'ctermbg': '238' },
"\}
highlight Normal ctermbg=323232
highlight Normal ctermbg=303030
highlight CursorLine ctermbg=238
highlight Visual ctermbg=240
#!/bin/sh
# (Ar)ch (pa)ckages - generic package tasks wrapper script
# Required programs
req_prgs=(pacaur sudo)
for prog in ${req_prgs[@]}; do
if ! hash "$prog" 2>&- ; then
echo >&2 ""${0##*/}": requires program: "$prog""
error=y ;fi ; done
[ "$error" = y ] && exit 1
# Bash-configuration for user
# Check for an interactive session
[ -z "$PS1" ] && return
## Settings ##
set_prompt_style () { # Custom prompt
local bldpur='\e[1;35m' # Purple
local bldblu='\e[1;34m' # Blue
@Gen2ly
Gen2ly / bckfile
Created December 24, 2013 21:31
Backup files with sequential numbering and optional tag
#!/bin/sh
# Backup files with sequential numbering and optional tag
# Display usage if given the incorrect number of parameters
if [ $# -ne 2 -a $# -ne 3 ]; then
echo "${0##*/} [file] [dir] [*tag]- Backup files with sequential numbering, opt. tag"
exit 1; fi
# Test if first and second parameters are a file and a directory
if [ ! -e "$1" ]; then
@Gen2ly
Gen2ly / gt
Created August 26, 2013 17:20
#!/bin/bash
# Create temporary file(s) and open in gedit
# Program required: gedit test
hash gedit 2>&- || { echo " Program required \"gedit\" not installed"; exit 1; }
# Display usage
if [[ $1 == -h ]]; then
echo "gt [name*] [name*]... - create temporary file(s) and open in gedit"
exit 1; fi
@Gen2ly
Gen2ly / lnk
Created July 5, 2013 14:15
Link shortcut
#!/bin/bash
# Link shortcut
# Display usage if incorrect number of parameters given
if [ $# != 2 ]; then
echo " ${0##*/} <source> <link> - ln shortcut"
exit 1; fi
# Source absolute path
if [ ! -e "$1" ]; then
@Gen2ly
Gen2ly / gist:5242082
Last active January 28, 2024 15:11
Doom3 configuration (autoexec.cfg)
// Graphic Card
seta sys_videoRam "512" // use com_videoRam to check if right
// Sound Card
seta s_alsa_pcm "plughw:1,0" // Use second sound out device
// Monitor
@Gen2ly
Gen2ly / gpuswitch
Created September 12, 2012 12:22
Switch between AMD's integrated video card and discrete video card
#!/bin/bash
# Switch between AMD's integrated video card and discrete video card
# Active GPU
gpu_active=$(aticonfig --px-list | cut -d " " -f 2)
# Restart X.org server
xorg_restart () {
gnome-session-quit --logout # GNOME, will still prompt if unsaved
# --no-prompt causing problems
@Gen2ly
Gen2ly / bcksysc
Created August 31, 2012 20:15
Backup system configurations
#!/bin/bash
# Backup system configurations
# Source Directory (should be root (/) as include and exclude files use full paths)
src_dir="/"
# Destination Parent Directory
dsp_dir="/mnt/Backup"
dsp_dir="/run/media/todd/Backup/rsync"