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
from hashlib import sha256 | |
import os | |
from pyramid.session import SignedCookieSessionFactory | |
def make_session_id(): | |
rand = os.urandom(16) | |
return sha256(sha256(rand).digest()).hexdigest() | |
class MemorySessionSerializer(object): |
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
from pyramid.config import Configurator | |
from pyramid.view import view_config | |
from pyramid.events import NewRequest, NewResponse, subscriber | |
@view_config(route_name='hello', renderer='string') | |
def hello(request): | |
print "View hello" | |
return 'Hello' | |
def response_callback(request, response): |
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
h2. I. Le SEL Villefranchois et son unité d'échange | |
Le SEL Villefranchois est un Système d'Échange Local (SEL) organisé en | |
association à but non lucratif, de type "loi 1901". Son rôle est de favoriser | |
les échanges non commerciaux de biens, de services et de savoir-faire. Ces | |
échanges seront occasionnels et d'ampleur modeste. Ils ne doivent en aucun cas | |
concurrencer les professionnels. | |
Ces échanges sont effectués de gré à gré entre les adhérents de l'association, | |
selon les offres et les demandes de chacun, répertoriées dans un catalogue. |
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
package sns | |
import ( | |
"io/ioutil" | |
"strings" | |
"testing" | |
) | |
var sns_delivery = ` | |
{ |
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
source $VIMRUNTIME/defaults.vim | |
let g:go_fmt_command = "goimports" | |
set ignorecase | |
set smartcase | |
set softtabstop=4 | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set ai | |
set number |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"runtime" | |
"strings" | |
) | |
// f1 call f2() and show the trace |