Skip to content

Instantly share code, notes, and snippets.

View mstyne's full-sized avatar
🐍
Improving my Python skills

Michael Styne mstyne

🐍
Improving my Python skills
View GitHub Profile
tesla:~ $ cat foo.txt
hello
tesla:~ $ `cat foo.txt`
-bash: hello: command not found
tesla:~ $ HELLO=`cat foo.txt`
tesla:~ $ echo $HELLO
hello
EATON-EPDU-MIB::inputCurrentCount.0.1 = INTEGER: 1
EATON-EPDU-MIB::inputCurrentMeasType.0.1.1 = INTEGER: singlePhase(1)
EATON-EPDU-MIB::inputCurrentCapacity.0.1.1 = INTEGER: 0
EATON-EPDU-MIB::inputCurrent.0.1.1 = INTEGER: 0
EATON-EPDU-MIB::inputCurrentThStatus.0.1.1 = INTEGER: good(0)
EATON-EPDU-MIB::inputCurrentThLowerWarning.0.1.1 = INTEGER: -1
EATON-EPDU-MIB::inputCurrentThLowerCritical.0.1.1 = INTEGER: -1
EATON-EPDU-MIB::inputCurrentThUpperWarning.0.1.1 = INTEGER: 14400
EATON-EPDU-MIB::inputCurrentThUpperCritical.0.1.1 = INTEGER: 16000
@mstyne
mstyne / openssl.sh
Created October 11, 2013 17:29
Self signed certificate one liner
openssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes -keyout server.key -out server.crt -subj '/O=Company/OU=Department/CN=www.example.com'
@mstyne
mstyne / blah.rb
Created September 27, 2013 16:00
#!/usr/bin/env ruby
require 'hapi'
hapi = HAPI.new(
:username => 'xxx',
:password => 'xxx',
:useauthkey => true,
:default_format => :ruby
)
@mstyne
mstyne / aprs_display_k2mts.md
Last active December 23, 2015 09:58
BOM for Portable APRS Display

K2MTS Portable APRS Display

The goal here is to create a small, portable APRS monitoring station for use in public service and emergency events. The components chosen here can be powered off of a 12VDC supply provided by a vehicle, battery, or conventional desktop power supply. Most of the components are affordable, and some of them we may already have on hand.

Mockup of Possible Configuration

Radio

BaoFeng UV-3R PLUS
Perhaps the club or a member is willing to donate an older HT that can be used for this purpose.

@mstyne
mstyne / gist:5990830
Created July 13, 2013 14:06
gqrx failed startup
$ ./gqrx
linux; GNU C++ version 4.7.2; Boost_104900; UHD_003.005.003-87-g8f4000ff
gr-osmosdr v0.1.0-1-gf80cd288 (0.1.1git) gnuradio v3.7.0-21-g7f21a6fe
built-in source types: file fcd rtl rtl_tcp uhd hackrf
Using Volk machine: avx_64_mmx_orc
QMetaObject::connectSlotsByName: No matching signal for on_antennaSelector_currentIndexChanged(QString)
gr-osmosdr v0.1.0-1-gf80cd288 (0.1.1git) gnuradio v3.7.0-21-g7f21a6fe
built-in source types: file fcd rtl rtl_tcp uhd hackrf
Using device #0 Realtek RTL2838UHIDIR
$ cat README.TXT
The "Cheaper Than Therapy" radio program[me] is a weekly adventure in frequency modulation. Both
professionally trained broadcasters, Rob and yours truly bring you the best of the music we like, flavored
with a dash of sophomoric humor and obscenities.
You can listen to the show every Wednesday morning on WSPN-FM, 91.1 in Saratoga Springs, NY from 3am to 6am.
Yeah, really, three in the morning.
Some of our older shows are online. You can download them if you don't have the aversion to sleep that we do.
@mstyne
mstyne / jenkins-vagrant.sh
Created June 7, 2013 18:53
Jenkins Vagrant thing
#!/usr/bin/env bash
VAGRANT=`which vagrant`
$VAGRANT up
UP_RETVAL=$?
sleep 2
[2013-05-23T17:39:39-04:00] INFO: Processing package[lsb-release] action install (uber-pacman::default line 53)
[2013-05-23T17:39:39-04:00] INFO: Processing ohai[reload] action reload (uber-pacman::default line 58)
[2013-05-23T17:39:39-04:00] INFO: [inet6] no default interface, picking the first ipaddress
[2013-05-23T17:39:39-04:00] INFO: ohai[reload] reloaded
15:53 <mstyne> do you really want to eat FRO YO
15:54 <boo> no, louise is about to arrive so I'm ducking out
15:54 <mstyne> wtf.
15:54 <boo> i told you I had to leave early
15:54 <mstyne> that's quite a stunt
15:54 <mstyne> i'll remember this
15:54 <mstyne> talk of fro yo, then there is no fro yo
15:54 <mstyne> FRO YOU!