An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
'use strict'; | |
const statusCodes = require('http').STATUS_CODES; | |
function createError(code, name) { | |
return function(message) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = name; | |
this.message = message; | |
this.statusCode = code; | |
} |
explainshell.com is a web app for intelligently
displaying man
page help text for a given command line.
This is helpful and convenient ... and anyone working from the command-line is going to want a CLI variant for obvious reasons.
There's been a number of requests for a CLI on explainshell's issue list.
In liue of a thin-client that queries a currently non-existing RESTful API
Extracted from this excellent curl
tutorial
Back in late 1995 they defined an additional way to post data over HTTP. It is documented in the RFC 1867, why this method sometimes is referred to as RFC1867-posting.
This method is mainly designed to better support file uploads. A form that allows a user to upload a file could be written like this in HTML:
A quick overview of the node.js streams interface with basic examples.
This is based on @brycebaril's presentation, Node.js Streams2 Demystified
Streams are a first-class construct in Node.js for handling data.
Think of them as as lazy evaluation applied to data.
Nice answer on stackoverflow to the question of when to use one or the other content-types for POSTing data, viz. application/x-www-form-urlencoded
and multipart/form-data
.
“The moral of the story is, if you have binary (non-alphanumeric) data (or a significantly sized payload) to transmit, use multipart/form-data
. Otherwise, use application/x-www-form-urlencoded
.”
Matt Bridges' answer in full:
The MIME types you mention are the two Content-Type
headers for HTTP POST requests that user-agents (browsers) must support. The purpose of both of those types of requests is to send a list of name/value pairs to the server. Depending on the type and amount of data being transmitted, one of the methods will be more efficient than the other. To understand why, you have to look at what each is doing
A multi-level groupBy for arrays inspired by D3's nest operator.
Nesting allows elements in an array to be grouped into a hierarchical tree
structure; think of it like the GROUP BY
operator in SQL, except you can have
multiple levels of grouping, and the resulting output is a tree rather than a
flat table. The levels in the tree are specified by key functions.
See this fiddle for live demo.
Resources for golang web development.
This is a summary of and reference for a few of the various things I've worked on at Constellation.