Skip to content

Instantly share code, notes, and snippets.

View mamund's full-sized avatar

Mike Amundsen mamund

View GitHub Profile
@mamund
mamund / a-uber-trailing-text.xml
Created April 1, 2014 22:51
handling trailing text node in UBER w/ standard XSLT processing
<uber version="1.0">
<data name="description">
<data name="name">Stephen</data>
is my name.
</data>
</uber>
@mamund
mamund / 01-example.html
Created April 18, 2014 14:07
scoping descriptor
<html>
<head>
<title>Example #1</title>
</head>
<body>
<h1>Example #1</h1>
<form action="..." method="get">
<input name="messageText" />
<input type="createDate" />
@mamund
mamund / microblogging.xml
Created April 28, 2014 15:41
Original ALPS Hypermedia Sample converted to new ALPS.IO
<alps>
<doc>
The example profile here contains details on customizing any representation media type for a specific
application domain: Micro-blogging. It contains descriptions of valid data and transition values that
can appear within resource representations. This document is presented as a complete blueprint for
implementing a compliant client or server that supports the basic features of the target application
domain (Micro-blogging).
</doc>
<link rel="help" href="http://amundsen.com/hypermedia/profiles/" />
@mamund
mamund / recipe-alps-00.xml
Last active August 29, 2015 14:00
recipe ALPS example
<alps version="1.0">
<descriptor id="ingredient" type="semantic">
<doc format="html">An ingredient of a cooking receipt</doc>
<descriptor id="name" type="semantic" rt="http://alps.io/schema.org/Text">
<doc format="html">The name of the ingredient, e.g. "flour"</doc>
</descriptor>
<descriptor id="amount" type="semantic">
<doc format="html">Describes how much of the ingredient is to be used</doc>
<descriptor id="unit" type="semantic" rt="http://alps.io/schema.org/Text">
@mamund
mamund / constrained-alps.xml
Last active August 29, 2015 14:01
highly-constrained ALPS profile vs. more generalized problem description ALPS profile.
<alps>
<link rel="profile" href="https://gist.github.com/mamund/f5ad7ebf2aa0833ceb89" />
<doc>
An example of a highly-constrained ALPS profile. One that leaves very
few choices to implementors. I don't recommend this kind of profile
design since the aesthetics of ALPS is to create profiles that focus
on the problem and allow creative people to design their own solutions
with that problem space. - @mamund
</doc>
@mamund
mamund / 01-users.js
Created May 16, 2014 16:33
handling non-symmetric edits for Cj
{ "collection" :
{
"version" : "1.0",
"href" : "http://api.example.com/users",
"links" : [
],
"items" : [
{
@mamund
mamund / read-only-items.js
Created May 21, 2014 14:40
read-only extension for items -- add the "read-only" property to the item element.
{ "collection" :
{
"version" : "1.0",
"href" : "http://api.example.com/users",
"links" : [
],
"items" : [
{
@mamund
mamund / a-products.js
Last active August 29, 2015 14:02
supporting saved searches w/ Cj representations
{
"collection" :
{
"version" : "1.0",
"href" : "http://api.example.org/products",
"links" : [
{"rel" : "search", "href" : "http://api.example.org/search", "prompt" : "Search"},
{"rel" : "profile", "href" : "http://schema.org/Product"}
],
@mamund
mamund / 01-message.js
Last active August 29, 2015 14:04
message extensions
{
"url" : "http://api.example.com/1",
"givenName" : "Mike",
"familyname" : "Amundsen",
"email" : "[email protected]",
"phone" : "123-456-7890"
}
@mamund
mamund / bioalps-mamund.js
Last active August 29, 2015 14:05 — forked from jenzopr/gist:6bab8db26fb2fb767c08
adjusted bio-alps example to move the custom "_property" section elements in into the existing "data" section for each item
{
"collection" : {
"version" : "1.0",
"href" : "http://example.org/assemblies/",
"links" : [
{
"rel" : "profile",
"href" : "http://alps.example.org/bioassembly.xml"
},
{