This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject archimedes-test "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[com.orientechnologies/orient-commons "1.3.0"] | |
[com.orientechnologies/orientdb-core "1.3.0"] | |
[com.tinkerpop.blueprints/blueprints-orient-graph "2.3.0"] | |
[clojurewerkz/ogre "2.3.0.1"] |
(:identity req)
is auth backend independent way to access user data- login and logout implementation depends on auth backend
:current-user
doesn't imply that authentication is required, route should also have:auth-rules
if authentication is required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lpeg = require'lpeg' | |
local P, R, S = lpeg.P, lpeg.R, lpeg.S --patterns | |
local C, Ct = lpeg.C, lpeg.Ct --capture | |
local V = lpeg.V --variable | |
local parser = P { | |
'program', -- initial rule | |
program = Ct(V'sexpr' ^ 0), | |
wspace = S' \n\r\t' ^ 0, | |
atom = V'boolean' + V'integer' + V'string' + V'symbol', |