Here is a checklist to follow if you want maximum battery life -- for instance if you're about to get on a long plane flight.
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
<!-- this usually goes in <project-root>/templates/uni_form/field.html --> | |
{% if field.is_hidden %} | |
{{ field }} | |
{% else %} | |
<div class="clearfix {% if field.errors %}error{% endif %}"> | |
<label for="{{ field.auto_id }}" {% if field.field.required %}class="requiredField"{% endif %}> | |
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %} | |
</label> | |
<div class="input"> |
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
Sources: | |
http://www.insee.fr/fr/themes/tableau.asp?reg_id=0&ref_id=NATTEF07232 | |
http://www.insee.fr/fr/themes/tableau.asp?reg_id=0&ref_id=NATnon02150 | |
population: 100.0% -> 65 000 000 | |
plus de 20: 75.5% -> 49 075 000 | |
age pop bac | |
15-19 ans 6.0% 0.6% -> 23 400 | |
20-24 ans 6.3% 16.3% -> 667 485 |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import os | |
from cgi import escape | |
from datetime import date, datetime | |
import markdown | |
from fabric.api import run, env | |
USERNAME = 'larlet' |
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
html.normal { | |
color: #4b4b4b; | |
background-color: white; | |
font: 14px/1.4em 'Menlo' sans-serif; | |
margin: 0; | |
padding: 0; | |
} | |
body.normal a img { | |
border: 0; |
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
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// shim layer with setTimeout fallback | |
window.requestAnimFrame = (function(){ | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || |
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
-- PostgreSQL 9.2 beta (for the new JSON datatype) | |
-- You can actually use an earlier version and a TEXT type too | |
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8 | |
-- JSON Types need to be mapped into corresponding PG types | |
-- | |
-- Number => INT or DOUBLE PRECISION | |
-- String => TEXT |
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
# -*- coding: utf-8 -*- | |
import os | |
from flask import Flask | |
from flask_heroku import Heroku | |
from flask_sslify import SSLify | |
from raven.contrib.flask import Sentry | |
from flask.ext.celery import Celery |
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
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
CHECKS = [ |