Skip to content

Instantly share code, notes, and snippets.

View halvener's full-sized avatar

Drew Houvener halvener

View GitHub Profile
""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable
"colorscheme desert
set background=dark
""""""""""""""""""""""""""""""""""""""""""""""""""
@halvener
halvener / nall
Last active June 4, 2022 21:18
Network Availability Listing Logger
#!/bin/bash
shopt -s -o nounset
#########################
# Trap exit to display end time
trap ctrl_c INT SIGINT
trap display_stats SIGUSR1
# Display stats on exit
function ctrl_c() {
@halvener
halvener / .bashrc
Last active August 29, 2015 14:21
RHEL 7 .bashrc file
# .bashrc
# Colors
black_text='\e[0;30m' # Black - Regular
red_text='\e[0;31m' # Red
green_text='\e[0;32m' # Green
yellow_text='\e[0;33m' # Yellow
blue_text='\e[0;34m' # Blue
purple_text='\e[0;35m' # Purple
cyan_text='\e[0;36m' # Cyan
@halvener
halvener / htoprc
Created May 20, 2015 19:08
htop config file
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=37 0 48 17 18 2 46 47 49 1
sort_key=49
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=1
@halvener
halvener / daemon.bash
Created February 7, 2014 14:59
A template for setting up a daemon that can be interrupted nicely.
#!/bin/bash
shopt -s -o nounset
##################################################
# Define Operating Variables
# DAEMON Indicating whether to continue the loop or not
# SLEEP_TIME Defines how long to sleep (in seconds) between executions
DAEMON=true
SLEEP_TIME=300
@halvener
halvener / template.bash
Last active June 4, 2022 21:18
Bash Template - Just a simple bash template that allows for easy argument parsing.
#!/bin/bash
shopt -s -o nounset
###################################################
# File:
# Notes:
# Revisions:
# Date Developer Description
# ---------- --------- -----------
# YYYY-MM-DD Name Initialized file