Skip to content

Instantly share code, notes, and snippets.

View tsloughter's full-sized avatar

Tristan Sloughter tsloughter

View GitHub Profile
{% extends "base.tpl" %}
{% block content %}
{% block title %}{{ m.rsc[id].title }}{% endblock %}
{% block chapeau %}
{% include "_article_chapeau.tpl" %}
fasdfsda
sdfs
FAILED (errors=2)
asdfsdfs
FAILED (errors=5)
sdfs
sdfsd
f
FAILED (errors=3)
%%%-------------------------------------------------------------------
%%% File : new_smtp.erl
%%% Author : Russell Brown <>
%%% Description : A google mail sender (cribbed from Benjamin Nortier's 21st C code works blog post http://21ccw.blogspot.com/2009/05/how-to-send-email-via-gmail-using.html)
%%%
%%% Created : 14 Jul 2009 by Russell Brown <>
%%%-------------------------------------------------------------------
-module(new_smtp).
%% API
case AdminRoles -- Roles of
AdminRoles -> % same list, not an admin role
case AdminNames -- [Name] of
AdminNames -> % same names, not an admin
throw({unauthorized, <<"You are not a db or server admin.">>});
_ ->
ok
end;
_ ->
ok
check_is_admin(#db{user_ctx=#user_ctx{name=Name,roles=Roles}}=Db) ->
{Admins} = get_admins(Db),
AdminRoles = [<<"_admin">> | couch_util:get_value(<<"roles">>, Admins, [])],
AdminNames = couch_util:get_value(<<"names">>, Admins,[]),
case AdminRoles -- Roles of
AdminRoles -> % same list, not an admin role
case AdminNames -- [Name] of
AdminNames -> % same names, not an admin
throw({unauthorized, <<"You are not a db or server admin.">>});
_ ->
21:38 (trunk)$ find ./ -name *.in | xargs egrep -h "%.*%" | awk -F"%" '{ print $2 $4 $6 }' | sort | uniq
ERL
bindircouchdb_command_name
bindircouchjs_command_namelocalbuilddatadir
bug_uri
couchprivlibdir
localconfdir
localconfdirdefaultini
localconfdirlocalini
(line-number-mode 1)
(global-linum-mode 1)
;; enable visual feedback on selections
(setq transient-mark-mode t)
; highlight during query
(setq query-replace-highlight t)
; highlight incremental search
(setq search-highlight t)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title></title>
</head>
<body>
<h1></h1>
<style>
#box, #input {
from flask import Flask
app = Flask(__name__)
@app.route("/lookup/<word>")
def lookup(word):
json = { 'definition' : internal_lookup(word) }
return json
@app.route("/add/<word>")
def add(word):