Skip to content

Instantly share code, notes, and snippets.

View maddox's full-sized avatar

Jon Maddox maddox

View GitHub Profile

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 April 8, 2018 01:56
XBMC crashes. Use this. #tvops

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

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 April 8, 2018 01:56
Just some experimentation in creating a live transcoding HTTP Live Streaming server for accessing an HDHomeRun
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
#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,
@maddox
maddox / commands.md
Created February 29, 2012 06:37
Install script for Samba3

Install Samba 3 on OS X 10.7 Lion

Run the two commands below one at a time to get Samba 3 installed and to have it run on boot.

Install Samba with Homebrew

sh < <(curl https://raw.github.com/gist/1938575/df254d9a2ac83dddb04fcc7f9b634b65708aa477/

Set Samba up to launch on boot

Process: Propane [411]
Path: /Applications/Tools/*/Propane.app/Contents/MacOS/Propane
Identifier: com.protocool.Propane
Version: 1.2.0 (1.2.0.9ec0791)
Code Type: X86 (Native)
Parent Process: launchd [226]
Date/Time: 2012-02-16 20:48:22.577 -0500
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
Process: Propane [1522]
Path: /Applications/Tools/*/Propane.app/Contents/MacOS/Propane
Identifier: com.protocool.Propane
Version: 1.2.0 (1.2.0.9ec0791)
Code Type: X86 (Native)
Parent Process: launchd [225]
Date/Time: 2012-02-16 16:58:01.958 -0500
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
@maddox
maddox / gist:1847853
Created February 16, 2012 21:06
Propane crash after Safari 5.2 dev release installed
Process: Propane [1082]
Path: /Applications/Tools/*/Propane.app/Contents/MacOS/Propane
Identifier: com.protocool.Propane
Version: 1.2.0 (1.2.0.9ec0791)
Code Type: X86 (Native)
Parent Process: launchd [225]
Date/Time: 2012-02-16 16:05:54.879 -0500
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
#import "NSString+Extras.h"
#include "markdown.h"
#include "html.h"
#include "buffer.h"
@implementation NSString (Extras)
- (BOOL)containsString:(NSString*)substring{
NSRange range = [[self lowercaseString] rangeOfString:[substring lowercaseString]];
BOOL found = (range.location != NSNotFound);