Skip to content

Instantly share code, notes, and snippets.

View dustindorroh's full-sized avatar

Dustin Dorroh dustindorroh

View GitHub Profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
source ~/colors.sh
function log () {
echo "$(date --rfc-3339=seconds) [$0] : $@" |& \
tee -a ${LOGFILE:-utils.log}
}
function warn () {
printf "$BIYellow""%s""$OFF""\n" "$(log $@)"
}
function error () {
#!/bin/sh
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt
# Reset
Color_Off='\e[0m' # Text Reset
Off='\e[0m'
OFF='\e[0m'
# Regular Colors
Black='\e[0;30m' # Black
@dustindorroh
dustindorroh / mail.py
Created September 16, 2012 01:00
Command line python program that sends an email with an attachment from your account to someone else.
#!/usr/bin/python
# -*-coding:utf-8-*-
#
# mail.py
#
# Copyright 2012 Dustin Dorroh <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by