Skip to content

Instantly share code, notes, and snippets.

View tblong's full-sized avatar

Tyler B. Long tblong

  • Atlanta, GA
View GitHub Profile
@tblong
tblong / rpi-network-watchdog.sh
Created May 29, 2019 23:09
Checks a pingable source and reboots the host when the failure limit is reached.
#!/bin/bash
#
# Original Source Attribution:
# Location: https://gist.github.com/SandroMachado/87e591fc42f368636b251b566485ae46
# Author: Sandro Machado
# Date of retrieval: 2019-05-28
#
# Script Summary:
# This script checks a pingable source and when the failure
# limit is reached the host is restarted. No files are written
@tblong
tblong / n4-px-chart-o-matic.py
Created September 28, 2016 00:51
Migrates PX page history view related chart button hyperlinks to use new N4 ChartWidget view
#
# This script crawls through any PX files found under the directory in which
# this script is executed. Any BoundLabelBinding found in the PX page which is related to a history
# hyperlink pointing to a history view will be modified to use an EnhancedHyperlinkBinding
# from the vykonPro jar file. This is generally meant to be used when there is an AX supervisor converted
# to N4. This script essentially upgrades all chart buttons to use the new N4 history ChartWidget view.
#
# IMPORTANT: Backup all PX files before executing this script.
#
# Instructions:
@tblong
tblong / removeDuplicatesInList.py
Last active August 26, 2016 14:06
Remove duplicates from list of numbers
#!/usr/bin/env python
#
# Remove duplicates from list of numbers
#
# @author tblong
#
# 2016-08-26: Added dictionary lookup insead of walking
# the entire list each time. The list will still maintain
# its original order.
#
@tblong
tblong / EC2-Stopped-Tagged-Lambda.py
Created July 15, 2016 19:59 — forked from mlapida/EC2-Stopped-Tagged-Lambda.py
Using a lambda function, stop all instances that are tagged appropriately.
import boto3
import logging
#setup simple logging for INFO
logger = logging.getLogger()
logger.setLevel(logging.INFO)
#define the connection
ec2 = boto3.resource('ec2')

Keybase proof

I hereby claim:

  • I am tblong on github.
  • I am tblong (https://keybase.io/tblong) on keybase.
  • I have a public key whose fingerprint is 17EE CAF9 8727 B073 EEC9 12E2 1942 4EC2 DB1B E465

To claim this, I am signing this object: