Skip to content

Instantly share code, notes, and snippets.

View jrtilson's full-sized avatar
🌮
Is a taco

Jeff Tilson jrtilson

🌮
Is a taco
View GitHub Profile
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@jrtilson
jrtilson / smartReadFile.php
Created April 17, 2013 19:06
PHP smartReadFile for media streaming!
<?php
/**
* Reads the requested portion of a file and sends its contents to the client with the appropriate headers.
*
* This HTTP_RANGE compatible read file function is necessary for allowing streaming media to be skipped around in.
*
* @param string $location
* @param string $filename
* @param string $mimeType
* @return void