This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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'%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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!" |