Skip to content

Instantly share code, notes, and snippets.

View gepa
#!/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
View .vimrc
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
View arpa
#!/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
View .bashrc
# 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 Dec 24, 2013
Backup files with sequential numbering and optional tag
View bckfile
#!/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
View gt
#!/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 Jul 5, 2013
Link shortcut
View lnk
#!/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 Dec 15, 2015
Doom3 configuration (autoexec.cfg)
View gist:5242082
// 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 Sep 12, 2012
Switch between AMD's integrated video card and discrete video card
View gpuswitch
#!/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 Aug 31, 2012
Backup system configurations
View bcksysc
#!/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"