Skip to content

Instantly share code, notes, and snippets.

View Pchelolo's full-sized avatar

Petr Pchelko Pchelolo

View GitHub Profile
@Pchelolo
Pchelolo / LICENSE.txt
Created May 27, 2011 18:15 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
x-backend-request:
uri: '...'
body:
part1:
field: '{$.req.body.field}'
part2: '{$.req.params}'
on_request:
- get_cached:
method: get # can be omitted, get is default
# Support cache-control refreshs;
# key_value bucket returns 404 when receiving no-cache header
headers:
cache-control: '{cache-control}'
uri: /{domain}/sys/key_value/postservice.png/{hash}
- return_on_success!: '{$.get_cached}'
- get_post:
- get_cached:
method: get # can be omitted, get is default
headers:
cache-control: '{cache-control}'
uri: /{domain}/sys/key_value/postservice.png/{hash}
- return_on_success!: '{$.get_cached}'
- get_post:
....
#!/bin/bash
if [ "$2" = "sqlite" ]
then
npm config set restbase:test_backend sqlite
else
npm config set restbase:test_backend cassandra
fi
if [ "$1" = "test" ]
on_setup:
- setup_png_storage:
request:
method: put
uri: /{domain}/sys/key_value/postservice.png
on_request:
- try_storage_and_return:
request:
method: get
{
"preset": "node-style-guide",
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
{
"preset": "node-style-guide",
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
# Indexes
- Index should be non-empty array
- Index cannot have duplicate attributes
- Index must have at least one 'hash' attribute
- All indexed attributes must exist in a schema
- Static indexes cannot be created on a table with no range indexes
# Revision policy
- Only keys 'type', 'grace_ttl' and 'count' are allowed
- Type can be 'all' and 'latest'
- Grace_ttl must be a number and can't be less then minGcGrace
/{module:graphoid}:
x-modules:
- name: simple_service
version: 1.0.0
type: file
options:
paths:
# Do we need those parameters??
/v1/png/{title}/{revision}:
post: