Skip to content

Instantly share code, notes, and snippets.

@technmsg
technmsg / cyber-books.md
Last active February 11, 2025 10:47
Textbooks, free to good home

A selection of computer textbooks, ranging the gamut from system administration to low-level hardware to cyber security management. All in excellent condition, some never opened.

Free to a good home if you'll cover shipping, although some of them are old enough that they'd be cheaper to order from Amazon directly.

Unclaimed books will be donated to The Book Thing of Baltimore.

Computer Hardware

@technmsg
technmsg / cloud_detect.sh
Created July 24, 2017 20:19
detect cloud platform
#!/bin/bash
#
# detect cloud platform and query for instance type
#
platform='unknown'
instance_type="unknown"
# AWS EC2
if [ -f /sys/hypervisor/uuid ] ; then
instance_uuid=$(cat /sys/hypervisor/uuid)
import argparse
import requests
import time
import json
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
def main():
"""
Entry point of the application
@technmsg
technmsg / rnr28-media.md
Last active March 28, 2017 12:58
RNR28 Media
@technmsg
technmsg / fountain.md
Last active February 7, 2017 14:16
fountain.md
@technmsg
technmsg / emv-chips-accepted.txt
Last active December 31, 2016 22:29
EMV Chips Accepted
BJ's Wholesale Club
China Express
(dermatologist)
Gina's Cantina
Gourmet Shish Kebab
Home Depot
Old Navy
Shoppers
Total Wine
Target
@technmsg
technmsg / tweet.sh
Last active November 25, 2016 16:26
TweetNull -- a Twitter client just for Sean
#!/bin/sh
# It ain't an application without usage.
if [ -z $1 ] ; then
echo "Usage: $0 <tweet body>"
exit 1
fi
# Tweet that mutha.
echo "tweeting: $@"
@technmsg
technmsg / gist:eaa5e76df738920e4ec80c4de4fc9564
Last active November 2, 2016 12:53
Lifetime Environmental Savings from solar panels
Lifetime Environmental Savings from solar panels, to date:
Mature Trees Grown: 137 trees
Garbage Recycled: 4,218 pounds
CO2 Emissions Avoided: 11,767 pounds
Miles Not Driven: 12,708 miles
Gasoline Not Used: 601 gallons
Coal Not Burned: 5,733 pounds
Crude Oil Not Used: 12 barrels
@technmsg
technmsg / gist:8247872
Created January 3, 2014 22:26
2013 outbound calls from home, courtesy of Asterisk CDR logs and a little shell/awk-fu.
$ ./annual_summary.sh 2013
== 2013 ==
Total Calls: 181 (2470 mins)
WebEx Calls: 60 (1464 mins)
Top 5 Destinations (count)
46 "16504793208"
13 "18776684493"
7 "1410PRIVATE"
@technmsg
technmsg / cm_license_reapply
Created November 27, 2013 15:14
Old snippet to re-apply a Cloudera Manager license key using the CM API, useful if CM needs to be rebuilt on a new host. Version unknown, use at your own risk.
#!/bin/sh
#
# Copyright 2013 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#