Skip to content

Instantly share code, notes, and snippets.

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 / handshake.json
Last active December 1, 2015 00:36
handshake event
{
"data": {
"action": "handshake",
"queue": [
{
"nodeIdentifier": {
"pageUrl": "http://www.ted.com/talks/marina_abramovic_an_art_made_of_trust_vulnerability_and_connection",
"family": "js",
"nodeId": "ted-player-4408",
"documentUrl": "http://www.ted.com/talks/marina_abramovic_an_art_made_of_trust_vulnerability_and_connection"
@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

@tifroz
tifroz / meteor diagnosis
Created September 13, 2012 22:45
meteor diagnosis (ubuntu dev)
curl -k https://raw.github.com/gist/3717981/20c856d150342529662bf05912467470979fa689 | /bin/sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
107 323 107 323 0 0 1372 0 --:--:-- --:--:-- --:--:-- 6094
===
Meteor version 0.4.0 (8f4045c1b9)
v0.6.18
---
/bin/sh: /usr/lib/meteor/meteor: not found
v0.6.17