Skip to content

Instantly share code, notes, and snippets.

@jeffskinnerbox
jeffskinnerbox / ntp-clock.ino
Created January 3, 2019 13:18
Test program for ESP8266 NodeMCU + 7-segment display + backpack from Adafruit. NodeMCU will drive the display as a clock synchronized, via NTP, with a NIST time server.
/*
Maintainer: jeffskinnerbox@yahoo.com / www.jeffskinnerbox.me
Version: 0.1.0
DESCRIPTION:
Test program for ESP8266 NodeMCU + 7-segment display + backpack from Adafruit.
NodeMCU will drive the display as a clock synchronized, via NTP, with a NIST time server.
PHYSICAL DESIGN:
Hardware
@jeffskinnerbox
jeffskinnerbox / latency-timer.py
Created March 17, 2018 02:47
Millisecond counter used to to help measure the latency in real-time video streaming
#!/usr/bin/python3
'''
Here is a simple Python script that will output the current time in milliseconds
to help measure the latency. Using this script, you encode and decode the
stream in two different terminal windows but on the same your desktop. Making a
screenshot of the desktop and it gives you the total system latency.
This may not be totally accurate because a snapshot of the desktop might occur
just before a new image is rendered by the X Window System, but should not be
@jeffskinnerbox
jeffskinnerbox / ip_check
Created February 7, 2016 17:37
This utility is used to periodically check to see if the external IP address has changed, and if so, send a notification giving the new IP address.
#!/bin/bash
# This utility is used to periodically check to see if the external IP address
# has changed, and if so, send a notification giving the new IP address.
#
# Reasons why crontab does not work - http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work
FLAG=0 # set to 1 for verbose output
MYPATH="/home/jeff/bin" # path to apprise, need for running in cron
@jeffskinnerbox
jeffskinnerbox / gmail-label.py
Created December 23, 2015 01:40
Test tool to print labels (aka mailboxes) for a Gmail account using Google Gmail APIs
#!/usr/bin/env python
"""Test tool to print labels (aka mailboxes) for a Gmail account using Google Gmail APIs # NOQA
When this tool starts, it reads a local file, called CLIENT_SECRET_FILE,
containing the Cline ID / Client Secret any existing credentials.
If the credentials don't exits, it then prompts you, via the web browser,
to authenticate to get them. It the credentials exist, but need to be renewed,
it will do that.
@jeffskinnerbox
jeffskinnerbox / extract_email.py
Created December 23, 2015 01:08
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
"""
@jeffskinnerbox
jeffskinnerbox / live_host.sh
Created September 15, 2015 14:45
This utility checks to see if a host is up or down
#!/bin/bash
# This utility checks to see if a host is up or down
#set -x # set for debugging
# set test flag
TEST=0
# Parse command line options
@jeffskinnerbox
jeffskinnerbox / apprise.sh
Created September 15, 2015 14:39
This utility does a push notification to the service Pushover - https://pushover.net/
#!/bin/bash
# This utility does a push notification to the service Pushover - https://pushover.net/
APPTOKEN="aegfmQiK9Krrigwmir4fgnoodw8w"
USERKEY="ufwidfifFYQHyggjdpdgeGfehdfpg"
# Parse command line options
USAGE="Usage: `basename $0` [-h] -t title -m message"
while getopts ht:m: OPT; do
@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
"""
@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 / .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: