This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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/", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require superagent | |
"use strict"; | |
function poll(fn) { | |
return superagent.get("/leaderboards/3c3c4514-ac4c-4b45-a054-2a3baa237ac9", fn); | |
} | |
var Leaderboard = React.createClass({ | |
getInitialState : function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { shape, str, num, bool } from "facts" | |
shape(thingToCheck, { | |
foo: str, | |
bar: num, | |
rawr: { | |
name: str, | |
age: num, | |
alive: bool | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | |
} |
OlderNewer