Skip to content

Instantly share code, notes, and snippets.

Jon Maddox maddox

Block or report user

Report or block maddox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@maddox
maddox / bb_price_check.rb
Created Nov 7, 2019
Best Buy Price Checker
View bb_price_check.rb
require 'rubygems'
require 'nokogiri'
require 'open-uri'
products = []
products << ["Beverage Cooler", "https://www.bestbuy.com/site/insignia-115-can-beverage-cooler-black-stainless-steel/6027001.p?skuId=6027001"]
products << ["10TB drive", "https://www.bestbuy.com/site/wd-easystore-10tb-external-usb-3-0-hard-drive-black/6278208.p?skuId=6278208"]
products << ["Hue White 4 pack", "https://www.bestbuy.com/site/philips-hue-white-a19-bluetooth-smart-led-bulb-4-pack-white/6347040.p?skuId=6347040"]
@maddox
maddox / lineup.txt
Created Aug 18, 2018
hdhomerun premium channels
View lineup.txt
QVC
WEATH
FNC
CNN
HLN
MSNBC
CNBC
CSPAN
ESPN
ESPN2
@maddox
maddox / switches.yaml
Created Nov 3, 2016
HA MQTT Switches for Harmony API
View switches.yaml
switch:
- platform: mqtt
name: "Family Room TV"
state_topic: "harmony-api/hubs/family-room/state"
command_topic: "harmony-api/hubs/family-room/activities/watch-apple-tv/command"
qos: 0
optimistic: true
payload_on: "on"
payload_off: "off"
- platform: mqtt
@maddox
maddox / switches.yaml
Created Sep 30, 2016
MQTT Switches for Harmony Activities for Home Assistant
View switches.yaml
- switch
- platform: mqtt
name: "TV"
state_topic: "harmony-api/hubs/family-room/state"
command_topic: "harmony-api/hubs/family-room/activities/watch-apple-tv/command"
qos: 0
optimistic: true
payload_on: "on"
payload_off: "off"
- platform: mqtt
@maddox
maddox / rolling-stones-500-greatest-albums-of-all-time.md
Created Jul 22, 2015
Rolling Stone's 500 Greatest Albums of All Time
View rolling-stones-500-greatest-albums-of-all-time.md
View spam.md

Subject: I have a questions about Mozilla Rust Seattle Meetup?

Hi Jon

I hope this email finds you well.

Are you in charge of event organization for Mozilla Rust Seattle Meetup? I am not sure if you're the right person to speak with. I was a researcher in computer science in UCSD and started the company to provide a mobile app to make organizers' job easier and more efficient by helping the event run smoother, and giving attendees better networking experiences.

@maddox
maddox / README.md
Last active Apr 8, 2018
XBMC crashes. Use this. #tvops
View README.md

Keep XBMC Alive on OS X

XBMC is great, but it kinda randomly crashes a lot. There's nothing worse than turning on your TV and seeing that XBMC isn't running anymore. It's even worse when its your significant other or roomate and you're out of town. #tvops.

So just install this launchd script to keep XBMC always running. This will launch it on boot, and if it crashes, it'll re-launch it.

Install

mkdir ~/Library/LaunchAgents
View gist:5569464

This guide is mirrored from http://miro.oorganica.com/raspberry-pi-mpd/ because it's down for me. Instead of relying on Google's cache, I figured I'd just store it here for life.

I’ve just setup MPD (Music Player Daemon) on my Rpi and it works beautifully.

Let get down to it:

Taking advantage of debian APT it is very simple to set it up:

@maddox
maddox / server.rb
Last active Apr 8, 2018
Just some experimentation in creating a live transcoding HTTP Live Streaming server for accessing an HDHomeRun
View server.rb
ffmpeg -i http://PRIMEIP:5004/auto/v1004 -async 1 -ss 00:00:05 -acodec libfdk_aac -vbr 3 \
-b:v \3000k -ac 2 -vcodec libx264 -preset superfast -tune zerolatency -threads 2 -s 1280x720 \
-flags -global_header -map 0:0 -map 0:1 -f segment -segment_time 10 -segment_list stream.m3u8 \
-segment_format mpegts -segment_wrap 10 -segment_list_size 6 -segment_list_flags live stream%03d.ts
View prog_index.m3u8
#EXTM3U
#EXT-X-TARGETDURATION:3
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:EVENT
#EXTINF:2.9614,
http://desky.local:9393/fileSequence102.ts
#EXTINF:2.961,
http://desky.local:9393/fileSequence103.ts
#EXTINF:2.961,
You can’t perform that action at this time.