Skip to content

Instantly share code, notes, and snippets.

<?php
//TODO get URL from parameters and authenticate it with an expiring hash/timestamp
$url = 'http://traffic.libsyn.com/atpfm/atp95.mp3';
// Forward these headers from original request
$requestHeaders = [];
if (isset($_SERVER['HTTP_USER_AGENT'])) $requestHeaders[] = 'User-Agent: ' . $_SERVER['HTTP_USER_AGENT'];
if (isset($_SERVER['HTTP_RANGE'])) $requestHeaders[] = 'Range: ' . $_SERVER['HTTP_RANGE'];
#!/bin/bash
# Fergus Staging Deploy Script
# Update git to staging
cd /var/www/fergus_internal_demo;
#!/bin/bash
function bgtext {
echo -e $(tput setab 24)" $1"$(tput sgr0);
<?php
public static function group_by(Array $objects, $group_by_property)
{
$grouped_objects = [];
foreach($objects as $object)
{
$property_value = $object->{$group_by_property};