Skip to content

Instantly share code, notes, and snippets.

@jeffskinnerbox
jeffskinnerbox / .conkyrc
Last active June 19, 2024 03:13
Conky configuration file
# --------------------------------------------------------------------------------------------- #
#
# .conkyrc - derived from various examples across the 'net
#
# Some of the sites that proved most usful include:
# http://mylinuxramblings.wordpress.com/2010/03/23/how-to-configure-the-conky-system-monitor/`
# http://crunchbanglinux.org/wiki/conky
# http://lusule.wordpress.com/2008/08/07/how-to-4/
#
# --------------------------------------------------------------------------------------------- #
@jeffskinnerbox
jeffskinnerbox / XBeeTerm.py
Last active July 16, 2019 15:52
This command interpreters establishes communications with XBee radios so that AT Commands can be sent to the XBee. The interpreters output is color coded to help distinguish user input, from XBee radio output, and from interpreters output.
#!/usr/bin/env python
"""XBeeTerm.py is a XBee serial command shell for interacting with XBee radios
This command interpretors establishes communications with XBee radios so that AT Commands can be sent to the XBee.
The interpretors output is color coded to help distinguish user input, from XBee radio output, and from
interpretors output. This command-line interpretor uses Python module Cmd, and therefore, inherit bash-like history-list
editing (e.g. Control-P or up-arrow scrolls back to the last command, Control-N or down-arrow forward to the next one,
Control-F or right-arrow moves the cursor to the right non-destructively, Control-B or left-arrow moves the cursor
to the left non-destructively, etc.).
@jeffskinnerbox
jeffskinnerbox / pretty.py
Created September 22, 2013 19:43
A library that provides a Python print, stdout, and string wrapper that makes colored terminal (Xterm/VT100 type terminals) text easier to use (e.g. without having to mess around with ANSI escape sequences).
#!/usr/bin/env python
"""pretty.py will color text for Xterm/VT100 type terminals using ANSI Escape Sequences
A library that provides a Python print, stdout, and string wrapper that makes colored terminal
text easier to use(e.g. without having to mess around with ANSI escape sequences).
Referance Materials:
Colored text in Python using ANSI Escape Sequences
http://nezzen.net/2008/06/23/colored-text-in-python-using-ansi-escape-sequences/
@jeffskinnerbox
jeffskinnerbox / Config-Coordinator.txt
Last active December 23, 2015 16:39
Script to configure XBee radio as a coordinator
# To remove comments, white spaces, and blank lines, use the following:
# sed '/^#/d; s/\([^$]\)#.*/\1/' Config-Coordinator.txt | sed 's/[ \t]*$//' > coord.txt
# Run this script to configure the XBee radio using the following:
# python XBeeTerm.py coord.txt
#
baudrate 9600 # (XBeeTerm command) set the baudrate used to comm. with the XBee
serial /dev/ttyUSB0 # (XBeeTerm command) serial device which has the XBee radio
+++ # (XBee command) enter AT command mode on the XBee
ATRE # (XBee command) restore XBee to factory settings
ATAP 2 # (XBee command) enable API mode with escaped control characters
@jeffskinnerbox
jeffskinnerbox / Config-End-Device.txt
Last active December 23, 2015 16:39
Script to configure XBee radio as a end device
# To remove comments, white spaces, and blank lines, use the following:
# sed '/^#/d; s/\([^$]\)#.*/\1/' Config-End-Device.txt | sed 's/[ \t]*$//' > endd.txt
# Run this script to configure the XBee radio using the following:
# python XBeeTerm.py endd.txt
#
baudrate 9600 # (XBeeTerm command) set the baudrate used to comm. with the XBee
serial /dev/ttyUSB0 # (XBeeTerm command) serial device which has the XBee radio
+++ # (XBee command) enter AT command mode on the XBee
ATRE # (XBee command) restore XBee to factory settings
ATAP 2 # (XBee command) enable API mode with escaped control characters
@jeffskinnerbox
jeffskinnerbox / XBeeQuery.py
Created September 22, 2013 20:01
This utility will query a XBee radio for some of it's AT Command parameters and print their values, as well as optional descriptive information.
#!/usr/bin/env python
"""
This utility will query a XBee radio for some of it's AT Command parameters and print their values, as well as
optional descriptive information. It has a set of default AT Commands or the use can provide the desired set
of AT Commands on the command-line.
The dictionary of AT Command descriptive information is limited but can be easily expanded. The descriptive
information was taken from the first reference given below. Also note that if this utility appears to hang,
it is almost certainly waiting on a response from the XBee. To continue processing the AT Command list, use Ctrl-C.
@jeffskinnerbox
jeffskinnerbox / XBeeModem.py
Created September 22, 2013 20:12
XBeeModem.py bypasses the XBee's 802.15.4 capabilities and simply uses it modem for communications
#!/usr/bin/env python
"""XBeeModem.py bypasses the XBee's 802.15.4 capabilities and simply uses it modem for communications
You don't have to master 802.15.4 and a large set of XBee commands
to make a very simple but potentially useful network. At its core,
the XBee radio is a modem and you can use it directly for simple serial communications.
Reference Materials:
Non-blocking read from stdin in python - http://repolinux.wordpress.com/2012/10/09/non-blocking-read-from-stdin-in-python/
@jeffskinnerbox
jeffskinnerbox / .gitignore
Last active July 6, 2021 20:13
.gitignore file for my Pelican based web blog
# Maintainer: jeffskinnerbox@yahoo.com / www.jeffskinnerbox.me
# Version: 1.1.1
#
# DESCRIPTION:
# This file specifies intentionally untracked files that Git should ignore.
#
# Each line in this .gitignore file specifies a regular expression pattern
# that, when matched, the coresponding file will NOT be include in Git processing.
#
# DOCUMENTATION:
@jeffskinnerbox
jeffskinnerbox / wlan-monitor.sh
Created December 23, 2014 21:59
Simple script for wireless stations monitoring
#!/bin/bash
#
# WLAN Minitoring Script Version v2.0
# OpenWrt Atheros wireless radio STA status monitor
# Developed by dir2cas <kalin.t.ivanov@gmail.com>
#
# Comments:
# Required packages: bash, iw, kmod- packages&drivers to get your wireless interface running
# Optional packages:
# install with $ opkg update; opkg install iw bash ....
@jeffskinnerbox
jeffskinnerbox / extract_email.py
Created September 15, 2015 11:56
This script test the overall process of logging into an email account, going to a specific folder, looking for emails from a specific sender, and extracting desired information from those email messages.
#!/usr/bin/env python
"""
This script test the overall process of logging into an email account,
going to a specific folder, looking for emails from a specific sender,
and extracting desired information from those email messages.
Sources and Inspirations:
Extract emails from Gmail with Python via IMAP - http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ # NOQA
"""