(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import { Kind } from 'graphql/language'; | |
| import { GraphQLScalarType } from 'graphql'; | |
| function serializeDate(value) { | |
| if (value instanceof Date) { | |
| return value.getTime(); | |
| } else if (typeof value === 'number') { | |
| return Math.trunc(value); | |
| } else if (typeof value === 'string') { | |
| return Date.parse(value); |
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } | |
| directives { |
| local oneprpc = require 'oneprpc' | |
| local json = require 'json' | |
| local rpc = oneprpc:new({cik = "9829879a04efb8f4a1b42e22245739678fd4a94e"}) | |
| local status, rid = rpc.create( | |
| "dataport", | |
| { | |
| format = "float", | |
| name = "Temperature", |
| local exosite = require 'exosite' | |
| local json = require 'dkjson' | |
| local exo = exosite.rpc:new{cik = "9829879a04efb8f4a1b42e22245739678fd4a94e"} | |
| local status, response = exo:create{ | |
| "dataport", | |
| { | |
| format = "float", | |
| name = "Temperature", |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| void function() {//closure | |
| var global = this | |
| , _initKeyboardEvent_type = (function( e ) { | |
| try { | |
| e.initKeyboardEvent( | |
| "keyup" // in DOMString typeArg | |
| , false // in boolean canBubbleArg | |
| , false // in boolean cancelableArg | |
| , global // in views::AbstractView viewArg |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| // ==UserScript== | |
| // @name Use Markdown, sometimes, in your HTML. | |
| // @author Paul Irish <http://paulirish.com/> | |
| // @link http://git.io/data-markdown | |
| // @match * | |
| // ==/UserScript== | |
| // If you're not using this as a userscript just delete from this line up. It's cool, homey. |