Skip to content

Instantly share code, notes, and snippets.

@broluwo
broluwo / #! Bash Prompt
Last active December 19, 2015 23:08
My current #! prompt
# ~/.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
@broluwo
broluwo / .zshrc
Last active December 24, 2015 20:49
Most Current Version
#Color table from: http://www.understudy.net/custom.html
fg_black=%{$'\e[0;30m'%}
fg_red=%{$'\e[0;31m'%}
fg_green=%{$'\e[0;32m'%}
fg_brown=%{$'\e[0;33m'%}
fg_blue=%{$'\e[0;34m'%}
fg_purple=%{$'\e[0;35m'%}
fg_cyan=%{$'\e[0;36m'%}
fg_lgray=%{$'\e[0;37m'%}
fg_dgray=%{$'\e[1;30m'%}
@broluwo
broluwo / doorman.py
Created May 7, 2014 15:17
RFID Reading Script for Doorman
#!/usr/bin/env python
#Run with root privileges, we may eventually want it to be a daemon but whatever
import serial# http://pyserial.sourceforge.net/
port = "/dev/ttyUSB0" # change port name to match the port of the card reader, should always be somewhere in dev
ser = serial.Serial(port, 2400) # open serial port
print "Enabling the module...",
ser.setDTR(True)# the module is enabled by asserting DTR
print "Success!"