Skip to content

Instantly share code, notes, and snippets.

@tifroz
tifroz / gist:2053246
Created March 16, 2012 22:20
json2html (v0.0.1) - sample output
<body>
<div class="expand clearfix even">
<div class="">
<div>
<div class="clearfix even collapse">
<div class="collapsible level1" onclick="j2h.toggleVisibility(this);return false">
[a_table]
</div>
<div class="content">
<table>
@tifroz
tifroz / caf-empty-queue-test-html
Last active December 10, 2017 02:19
Test of the CAF queueManager interface
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js">
</script>
</head>
<body>
<cast-media-player></cast-media-player>
@tifroz
tifroz / caf-receiver-test-for-cors.html
Created December 9, 2017 03:16
Google Cast: CAF receiver test for plain mp4 file
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js">
</script>
</head>
<body>
<cast-media-player></cast-media-player>
<script>
@tifroz
tifroz / opensubtitles-search.js
Last active June 5, 2017 17:41
opensubtitles son response for subtitle search
{
"status": 200 OK,
"data": [
{
IDMovie = 18653;
IDMovieImdb = 317219;
IDSubMovieFile = 0;
IDSubtitle = 6447655;
IDSubtitleFile = 1955029911;
ISO639 = tr;
@tifroz
tifroz / boku-request-example.js
Created April 24, 2017 19:14
A server-side header capture, for a request originated from the roku video player
{
"host": "webtv.dev.example.com",
"accept-language": "en-us",
"x-playback-session-id": "F7880627-642C-4A60-99F4-F1BAE9EBCA4B",
"cookie": "_ga=GA1.2.497125455.148518954; cookie=bah",
"range": "bytes=7077888-7340031",
"accept": "*/*",
"user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1",
"referer": "http://webtv.dev.example.com/cookie/test-simple.html",
"accept-encoding": "identity",
{
"code": 0,
"message": "",
"validated": true,
"subscriptions": {
"com.swishly.webtv.iap1.sub.1_month.pro": {
"quantity": "1",
"product_id": "com.swishly.webtv.iap1.sub.1_month.pro",
"transaction_id": "300000183400290",
"original_transaction_id": "300000173028147",
@tifroz
tifroz / reporter-sub.json
Last active March 2, 2017 02:01
Apple Reporter Subscription Event
{
"Event Date": "2017-02-25",
"Event": "Renew",
"App Name": "[App Name Scrubbed]",
"App Apple ID": "[App Id Scrubbed]",
"Subscription Name": "[Subscription Name Scrubbed]",
"Subscription Apple ID": "1177256379",
"Subscription Group ID": "20349774",
"Subscription Duration": "1 Month",
"Trial": "",
[
{ // After initial subscription
quantity: '1',
product_id: 'com.swishly.webtv.iap.sub.1_month.pro',
transaction_id: '1000000240219625',
original_transaction_id: '1000000240219625',
purchase_date: '2016-10-04 23:04:31 Etc/GMT',
purchase_date_ms: '1475622271000',
purchase_date_pst: '2016-10-04 16:04:31 America/Los_Angeles',
original_purchase_date: '2016-10-04 23:04:33 Etc/GMT',
@tifroz
tifroz / chromecast_whitelisted.js
Created September 9, 2013 17:23
List of receiver apps that are allowed to run on chromecast
{
"configuration": { },
"applications": [
{
"app_name": "GoogleMusic",
"url": "https://play.google.com/music/cast/player",
"use_channel": true,
"allow_empty_post_data": true,
"allow_restart": true
},
@tifroz
tifroz / emberjs_stack.js
Last active December 22, 2015 09:39
jsbin libraries setup
libraries.add([{
text:"EmberJS 1.0.x",
scripts:[
{text: "JQuery 1.10.2", url: "http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"},
{text: "Handlebars 1.0.0", url: "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js"},
{text: "Ember 1.0.0", url: "http://builds.emberjs.com/tags/v1.0.0/ember.js"},
{text: "Ember Data beta", url: "http://builds.emberjs.com/beta/ember-data.js"}
]
}])