Skip to content

Instantly share code, notes, and snippets.

View maddox's full-sized avatar

Jon Maddox maddox

View GitHub Profile
@tekkub
tekkub / remux_for_appletv.rb
Created October 20, 2010 21:05
Remux that shit!
#!/usr/bin/env ruby
raise "Specify a video file!" unless mkv_file = ARGV.first
audio_file = mkv_file.gsub(/\.mkv/, ".ac3")
audio_track_file = mkv_file.gsub(/\.mkv/, ".mp4")
video_file = mkv_file.gsub(/\.mkv/, ".264")
m4v_file = mkv_file.gsub(/\.mkv/, ".m4v")
VLC_PATH = "/Applications/VLC.app/Contents/MacOS/VLC"
MP4BOX_PATH = "/Users/tekkub/bin/MP4box"
@cnix
cnix / gist:660749
Created November 3, 2010 02:55
Punch Recipe
750ml Meyer's Dark Rum
750ml Meyer's Light Rum
46oz Pineapple Juice
32oz Orange Juice
32oz Mango Juice
#!/usr/bin/env ruby
#
# SHOW ME
# Takes X pictures of you via your iSight, animates them, uploads them to CloudApp, and puts
# the url in your clipboard
#
# This uses a bunch of projects to make the magic happen, mostly thanks
# to Zach Holman: http://github.com/holman
#
#
@maddox
maddox / gist:925543
Created April 18, 2011 15:19
Install ShairPort for 10.6
@teich
teich / gist:1000964
Created May 31, 2011 17:53
May 31st Heroku Updates
@maddox
maddox / ma2mame.rb
Created June 3, 2011 05:16
Convert a Maximus Arcade game list to a MameUI game list
require 'rubygems'
require 'json'
require 'open-uri'
filename = "MAME_Favorites.txt"
list_text = open(filename).read
# replace brackets
list_text.gsub!('[', '{')
@rubysolo
rubysolo / etc_init.d_unicorn_example.co.uk
Created October 27, 2011 20:04 — forked from scottlowe/etc_init.d_unicorn_example.co.uk
Ruby on Rails server setup on Ubuntu 11.04 with Nginx, Unicorn, Rbenv
#! /bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 23, 2024 15:50
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@snatchev
snatchev / SafariApnController.rb
Last active December 30, 2015 20:39
An example Ruby implementation using ZeroPush to send Safari Push Notifications
class SafariApnController < ApplicationController
# When a user allows permission to receive push notifications, a POST request is sent to the following URL:
# webServiceURL/version/pushPackages/websitePushID
# post '/:version/pushPackages/:website_push_id' => 'safari_apn#package'
def package
#return the push package
send_file(File.join(Rails.root, 'public', 'pushPackage.zip'), type: 'application/zip', disposition: 'inline')
end
@joshhunt
joshhunt / index.js
Last active August 29, 2017 07:45
Socket.io live reload for Apple TV TVML app
import 'babel-polyfill';
import firstView from 'views/first';
import * as liveReload from 'lib/liveReload';
App.onLaunch((launchOptions) => {
firstView();
liveReload.connect(launchOptions);
});