Skip to content

Instantly share code, notes, and snippets.

var data = [
{name: "bob", read: false},
{name: "gary", read: true},
{name: "steve", read: true},
{name: "mike", read: false}
];
// isRead :: (d: object): bool
function isRead(d) {
return d.read;
{
trial: true,
cancelled: true,
title: "Monthly membership.....",
rate: "$9/month",
access_information: "blah blah blah",
access_action: { label: "resume", href: "", type: "resume" },
actions: [
{ label, href, type },
{ label, href, type }
// @flow
"use strict";
module.exports = {
"315": {
"id" : 315,
"title" : "AngularJS: Novice to Ninja",
"src" : "//d2sis3lil8ndrq.cloudfront.net/books/angularjs1_medium_3d.png",
"href" : "http://www.sitepoint.com/store/angularjs-novice-ninja/",
@orodio
orodio / robot.clj
Last active August 29, 2015 14:11
robot.clj
(def robot (atom {:x 0 :y 0 :direction :north}))
(def behaviour {:left {:north :west
:west :south
:south :east
:east :north}
:right {:north :east
:east :south
:south :west
//= require superagent
"use strict";
function poll(fn) {
return superagent.get("/leaderboards/3c3c4514-ac4c-4b45-a054-2a3baa237ac9", fn);
}
var Leaderboard = React.createClass({
getInitialState : function() {
<ads-accordion></ads-accordion>
<ads-accordion
header='{"src": "http://placehold.it/300x50/000/fff&text=header", "href": "http://newrelic.com"}'
footer='{"src": "http://placehold.it/300x50/000/fff&text=footer", "href": "http://newrelic.com"}'
data='[
{"src": "http://placehold.it/300x100/f0c/fff", "text": "Hooray", "cta": "join today", "href": ""}
]'
></ads-accordion>
function sum8(_x, _x2) {
_function: while (true) {
var x = _x,
y = _x2;
if (y > 0) {
_x = x + 1;
_x2 = y - 1;
continue _function;
} else {
if (y < 0) {
app_1 | [ 'save',
app_1 | 'lrem',
app_1 | 'auth',
app_1 | 'append',
app_1 | 'psetex',
app_1 | 'shutdown',
app_1 | 'sync',
app_1 | 'blpop',
app_1 | 'dbsize',
app_1 | 'rpop',
import { shape, str, num, bool } from "facts"
shape(thingToCheck, {
foo: str,
bar: num,
rawr: {
name: str,
age: num,
alive: bool
}
function value (line) {
const [, t, c, v] = line.split(" ")
return {t, p: {cursor: c.split("::"), value: v}}
}
function header (line) {
const [,...rest] = line.split(" ")
const c = rest.join(" ")
return {t: "header", c}
}