Skip to content

Instantly share code, notes, and snippets.

Hazel Fidecaro hipsterjazzbo

Block or report user

Report or block hipsterjazzbo

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
View gist:b33d14ad9ff8970cd632
<?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'];
View deploy.sh
#!/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);
View Collection::group_by().php
<?php
public static function group_by(Array $objects, $group_by_property)
{
$grouped_objects = [];
foreach($objects as $object)
{
$property_value = $object->{$group_by_property};
You can’t perform that action at this time.