Skip to content

Instantly share code, notes, and snippets.

View melodymorgan's full-sized avatar

Melody Morgan melodymorgan

View GitHub Profile
if( /web/i.test(DEVICE) === true && top != self){
var threshold = 768;
if (window.screen.width < threshold) {
top.location.replace("https://sytycd.fox.com/?app=web");
}
}
$params = $this->getParams();
$binary_hash = hash_hmac('sha1', $params, $this->secretKey, true);
$base64_hash = base64_encode($binary_hash);
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $this->apiUrl . $params,
CURLOPT_HTTPHEADER => Array('Authorization: ' . $base64_hash),
CURLOPT_RETURNTRANSFER => true,
@melodymorgan
melodymorgan / getLatestData.js
Created October 18, 2012 19:09
Rickshaw Update Graph Realtime Data
var seriesData = [ [{ x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 17 }, { x: 3, y: 42 }] ];
var graph = new Rickshaw.Graph( {
element: document.getElementById("chart"),
width: 940,
height: 250,
renderer: 'area',
stroke: true,
series: [
{
color: 'steelblue',