Skip to content

Instantly share code, notes, and snippets.

@tifroz
tifroz / ios7 font names
Created April 26, 2014 22:19
All ios7 font names
Thonburi-Bold
Thonburi
Thonburi-Light
SnellRoundhand-Black
SnellRoundhand-Bold
SnellRoundhand
AcademyEngravedLetPlain
MarkerFelt-Thin
MarkerFelt-Wide
Avenir-Heavy
@tifroz
tifroz / loadEvent.json
Created August 31, 2015 19:15
Use as a reference when mocking up / creating a LOAD event for the chromecast receiver
{
"type":"message",
"Z":false,
"defaultPrevented":false,
"Yb":true,
"senderId":"14:DC8024DC-1122-4903-8D28-E2BEF7C3BE9B",
"data":{
"currentTime":0,
"requestId":6,
"type":"LOAD",
/**
* Generates a new UUID and passes it to the given callback function.
*
* Uses the a command-line uuid generator. Caches UUIDs to avoid
* unneccessary spawning of new processes.
*
* You can easily adjust the script used to create the UUID. By
* default I am using the OSSP uuid program, which is available in
* most linux distro's package managers (e.g. `sudo apt-get install
* uuid` on ubuntu).
@tifroz
tifroz / PushNotification.m
Created March 19, 2011 23:42
APN processing
#import "PushNotification.h"
#import "JSON.h"
@implementation PushNotification
@synthesize notificationMessage;
@synthesize registerSuccessCallback;
@synthesize registerErrorCallback;
@tifroz
tifroz / seq infinite loop
Created March 30, 2011 00:21
Cut & paste in node REPL to reproduce the infinite loop error
var Seq = require('seq')
Seq().par(function(){console.log('par1');this()}).catch(function(){console.log('catch1')}).seq(function(){console.log('seq1');this(new Error('err'))}).catch(function(){console.log('catch2')});
@tifroz
tifroz / Unpredictable order of parameter
Created March 30, 2011 23:54
node-seq: code to reproduce 'Unpredictable order of parameter'
#The Coffee-script version#
Seq = require('seq')
Seq() .par('one',->setTimeout((=>this(null,1)),5000))
.par('two',->setTimeout((=>this(null,2)),100))
.seq((one, two)->console.log('one: '+one+', two:'+two))
#The JS version#
@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
@tifroz
tifroz / _.md
Created October 4, 2012 16:32 — forked from anonymous/inlet.js
just another inlet to tributary

No Previous Gist

@tifroz
tifroz / _.md
Created October 19, 2012 22:41
just another inlet to tributary
@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