Skip to content

Instantly share code, notes, and snippets.

View cafca's full-sized avatar

Vincent Ahrend cafca

View GitHub Profile
-- the document table keeps track of the latest view for each document.
-- deleting the document will cascade through "document_view" and the different
-- view field columns below.
CREATE TABLE "document" (
"document_id" INTEGER PRIMARY KEY,
"latest_view" INTEGER DEFAULT NULL
);
-- the document view table keeps a record of all document views we have
-- DROP SCHEMA public CASCADE;
-- CREATE SCHEMA public;
-- the document table keeps track of the latest view for each document.
-- deleting the document will cascade through "document_view" and the different
-- view field columns below.
CREATE TABLE "document" (
"document_id" INTEGER PRIMARY KEY,
"latest_view" INTEGER DEFAULT NULL
type Query {
# Retrieve individual entries either by hash, or by a author, log id, sequence number
entry(
spec: [String | EntrySpec],
): [EntryWithPayload]
# Retrieve a collection of entries filtered by author, range and/or schema
allEntries(
author: [AuthorRangeSpec],
schema: [String],
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cafca
cafca / config.json
Last active August 29, 2015 14:21 — forked from anonymous/config.json
Bootstrap Custom Configuration
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#0b3954",
"@brand-success": "#1dc849",
@cafca
cafca / real_ip_address.py
Last active December 17, 2015 06:28 — forked from elidickinson/real_ip_address.py
removed trailing whitespace
from flask import Request
class ProxiedRequest(Request):
"""
`Request` subclass that overrides `remote_addr` with Frontend Server's
HTTP_X_FORWARDED_FOR when available.
"""
@property
def remote_addr(self):