Skip to content

Instantly share code, notes, and snippets.

@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"}
]
}])
Package.describe({
summary: "Dummy Package"
});
Package.on_use(function(api) {
api.use(["coffeescript", "templating", "less", "underscore"], "client");
api.export("controller");
api.add_files(["controller.html", "controller.less", "controller.coffee", "controllerUtils.coffee"], "client");
});
function (tweet, user){
var isJourno = false ;
var isUrlOnlyMatch = false ;
var isViaFeedly = false ;
var journoRE = /\beditor\b|\bjournalist\b|\bwriter\b|\bcolumnist\b|\bblogger\b/ ;
var feedlyRE = /\bfeedly\b/ ;
var viafeedlyRE = /\bvia @feedly\b/ ;
var isFrenchOrEnglish = (tweet.lang === "en" || tweet.lang === "fr") ;
var isProminent = user.followers_count > 10000 ;
@tifroz
tifroz / admin.js
Last active December 20, 2015 02:19
Sample data
{
"source": {
"created_at": "Sun Dec 14 07:00:20 +0000 2014",
"id": 544024071747682300,
"id_str": "544024071747682304",
"text": "RT @jjenkov: Netflix burned by Express.js - interesting performance case study http://t.co/mIWDvurAzQ #nodejs #expressjs",
"source": "<a href=\"http://www.blaccspot.com\" rel=\"nofollow\">JavaScript Digest</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
@tifroz
tifroz / gist:4280940
Created December 13, 2012 23:01
status details
{ "details" : [ { "signature" : "POST /2.3.0/driver/coords/:id", "errors" : 0, "total" : 785, "latency" : "Avg 41ms, Max 9920ms", "codes" : { "200" : 785 } }, { "signature" : "GET /2.3.0/bayeux/driver/:id", "errors" : 2, "total" : 445, "latency" : "Avg 19020ms, Max 20060ms", "codes" : { "200" : 443, "disconnect" : 2 } }, { "signature" : "POST /2.3.0/bayeux/driver/:id", "errors" : 0, "total" : 329, "latency" : "Avg 44ms, Max 1360ms", "codes" : { "200" : 329 } }, { "signature" : "GET /2.3.0/rider/config", "errors" : 0, "total" : 3, "latency" : "Avg 10ms, Max 20ms", "codes" : { "200" : 3 } }, { "signature" : "GET 2.3.0/patch.js", "errors" : 4, "total" : 4, "latency" : "Avg 0ms, Max 0ms", "codes" : { "404" : 4 } }, { "signature" : "GET /2.3.0/lookup/citiesByName", "errors" : 0, "total" : 2, "latency" : "Avg 115ms, Max 140ms", "codes" : { "200" : 2 } }, { "signature" : "PUT /2.3.0/driver/config/:id", "errors" : 0, "total" : 15, "latency" : "Avg 41ms, Max 80ms", "co
@tifroz
tifroz / request stream within callback
Created November 1, 2012 01:29
Test case for bug in request module
var Stream, params, request;
request = require('request');
Stream = require('stream');
params = {
url: 'http://www.this-page-intentionally-left-blank.org'
};
@tifroz
tifroz / demo.coffee
Created October 25, 2012 22:20
Meteor app demonstrating the issue: "method execution blocks data updates"
if Meteor.isClient
serverTicks = new Meteor.Collection "serverTicks"
Template.hello.status = ->
return Session.get("status")
Template.hello.serverTicks = ->
tick = serverTicks.findOne {}
return tick?.count
@tifroz
tifroz / _.md
Created October 19, 2012 22:41
just another inlet to tributary
@tifroz
tifroz / _.md
Created October 4, 2012 16:32 — forked from anonymous/inlet.js
just another inlet to tributary

No Previous Gist