Skip to content

Instantly share code, notes, and snippets.

View nickl-'s full-sized avatar

Nick Lombard nickl-

View GitHub Profile
@nickl-
nickl- / make.out.term
Created July 11, 2012 19:36
Respect/Foundation make menus
$ make
Respect/Foundation - 0.1.11
=====================================================================
Respect/Foundation Menu
=====================================================================
help: Shows Respect/Foundation Help Menu: type: make help
foundation: Installs and updates Foundation
=====================================================================
Other Targets Menus
@nickl-
nickl- / router.php
Created July 13, 2012 13:46 — forked from alganet/router.php
Another approach to multiple paths
<?php
$paths = array(
'/users',
'/users/*',
'/users/*/lists',
'/users/*/lists/*',
);
// Multiple paths handled by single callback
$r3->any($paths, function ($userId=null,$listId=null) {/***/}
@nickl-
nickl- / gist:4336909
Created December 19, 2012 14:07
json-schema-ex-basic
{
"description": "A representation of a product from Acme's catalog",
"type": "object",
"properties": { }
}
@nickl-
nickl- / gist:4336918
Created December 19, 2012 14:10
update-schema
{
"description": "A representation of a product",
"type": "object",
"properties": {
"id": {
"description": "The unique, canonical identifier for a product ",
"type": "number",
"required": true
}
}
@nickl-
nickl- / gist:4336933
Created December 19, 2012 14:12
json-schema-name
{
"description": "A representation of a product",
"type": "object",
"properties": {
"id": {
"description": "The unique, canonical identifier for a product ",
"type": "number",
"required": true
},
"name": {
@nickl-
nickl- / gist:4336945
Created December 19, 2012 14:13
json-schema-number
{
"description": "A representation of a product",
"type": "object",
"properties": {
"id": {
"description": "The unique, canonical identifier for a product ",
"type": "number",
"required": true
},
"name": {
@nickl-
nickl- / gist:4336949
Created December 19, 2012 14:15
json-schema-tags
{
"description": "A representation of a product",
"type": "object",
"properties": {
"id": {
"description": "The unique, canonical identifier for a product ",
"type": "number",
"required": true
},
"name": {
@nickl-
nickl- / gist:4336950
Created December 19, 2012 14:15
json-schema-set
[
{
"id": 2,
"name": "An ice sculpture",
"price": 12.50,
"tags": ["cold", "ice"],
"dimensions": {
"length": 7.0,
"width": 12.0,
"height": 9.5
@nickl-
nickl- / gist:4336979
Created December 19, 2012 14:20
json-schema-schema
{
"description": "A set of products",
"type": "array",
"items": {
"description": "A representation of a product",
"type": "object",
"properties": {
"id": {
"description": "The unique, canonical identifier for a product ",
"type": "number",
{
"id": 1,
"name": "A green door",
"price": 12.50,
"tags": ["home", "green"]
}