re: https://twitter.com/apiblueprint/status/374456335846612992
application/json;charset=utf-8
application/json; charset=utf-8
application/json; charset="utf-8"
application/json // since JSON's default unicode charset is UTF-8
#!/usr/bin/env bash | |
# Be sure to install the apiary gem; https://github.com/apiaryio/apiary-client | |
# gem install apiary | |
# You'll need to get a token here; https://login.apiary.io/tokens | |
APIARY_API_KEY= | |
# Your apiname here; docs.$APINAME.apiary.io | |
APINAME= |
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types. | |
Discussion at | |
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/ |
FORMAT: 1A | |
# Test API | |
## Items [/items{?filter}] | |
### List all Items [GET] | |
+ Parameters | |
The regex patterns in this gist are intended only to match web URLs -- http, | |
https, and naked domains like "example.com". For a pattern that attempts to | |
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502 | |
# Single-line version: | |
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s |
Feature: Root Resource | |
As an API client | |
I want to see the root resource | |
So that I have a starting point to complete my task. | |
Scenario: Request the root | |
Given an anonymous client | |
When I make a GET request to / | |
Then I should get a 200 status code | |
And the content type should be JSON |
class nodejs { | |
exec { 'nvm-install': | |
command => '/usr/bin/curl https://raw.github.com/creationix/nvm/master/install.sh | /bin/sh', | |
creates => '/home/vagrant/.nvm', | |
user => 'vagrant', | |
environment => 'HOME=/home/vagrant', | |
require => Package['curl'] | |
} |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>mdown</string> | |
<string>markdown</string> | |
<string>markdn</string> | |
<string>md.hbs</string> |
{ "@context": { | |
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | |
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
"owl": "http://www.w3.org/2002/07/owl#", | |
"express": "http://example.com/express#", | |
"defines": { | |
"@reverse": "rdfs:isDefinedBy" | |
}, | |
"propertyOf": { | |
"@id": "rdfs:domain", |
// List all files in a directory in Node.js recursively in a synchronous fashion | |
var walkSync = function(dir, filelist) { | |
var fs = fs || require('fs'), | |
files = fs.readdirSync(dir); | |
filelist = filelist || []; | |
files.forEach(function(file) { | |
if (fs.statSync(dir + file).isDirectory()) { | |
filelist = walkSync(dir + file + '/', filelist); | |
} | |
else { |
re: https://twitter.com/apiblueprint/status/374456335846612992
application/json;charset=utf-8
application/json; charset=utf-8
application/json; charset="utf-8"
application/json // since JSON's default unicode charset is UTF-8