Skip to content

Instantly share code, notes, and snippets.

View Sanqui's full-sized avatar
🦉

Sanqui Sanqui

🦉
View GitHub Profile
@Sanqui
Sanqui / cake.py
Created January 4, 2013 10:15 — forked from kanzure/cake.py
Now supports Python 3
lines = {
11: " / ; ,-, \\_> <<_' ____________;_)",
7: " | | .--| |,~~~~~| |~~~,,,,'-| |",
3: " ( Y Y ( )",
9: " .| |~ // ___ '-',,'.",
15: " | '-._ ~~,,, ,,,~~ __.-'~ | |",
13: " | ; '-'\_\/> '-._ |",
20: " \ `'==========='` .'",
2: " ( ) ( ) (",
8: " | |-,,~~'-'___ '-' ~~| |._",
@Sanqui
Sanqui / helper.py
Created September 22, 2012 08:49 — forked from mitsuhiko/helper.py
url_for_here()
from flask import request, url_for
# Supports multiple query args with the same key.
def url_for_here(**changed_args):
args = request.args.to_dict(flat=False)
args.update(request.view_args)
args.update(changed_args)
return url_for(request.endpoint, **args)
app.jinja_env.globals['url_for_here'] = url_for_here