$ sudo -u postgres psql
postgres=# CREATE USER example WITH PASSWORD 'example';
1. install openjdk | |
`sudo apt-get install openjdk-7-jdk` | |
2. install `android sdk` | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>simplyCountdown.js example</title> | |
<link rel="stylesheet" href="css/simplyCountdown.theme.default.css"/> | |
</head> | |
<body> | |
<section class="examples"> | |
<div class="simply-countdown-example"></div> |
@screen-phone: 480px; | |
@screen-tablet: 760px; | |
@screen-desktop: 992px; | |
@screen-lg-desktop: 1200px; | |
@screen-xs-max: (@screen-phone - 1); | |
@screen-sm-max: (@screen-tablet - 1); | |
@screen-md-max: (@screen-desktop - 1); |
# Install from NPM | |
npm install share-selected-text | |
#Install from Bower | |
bower install share-selected-text |
from django.utils.safestring import mark_safe | |
from markdown import markdown | |
from pygments import highlight | |
from pygments.formatters import get_formatter_by_name | |
from pygments.lexers import get_lexer_by_name | |
from wagtail.wagtailcore import blocks | |
class CodeBlock(blocks.StructBlock): |
import sys | |
def progress(count, total, suffix=''): | |
bar_len = 50 | |
filled_len = int(round(bar_len * count / float(total))) | |
percents = round(100.0 * count / float(total), 1) | |
bar = '█' * filled_len + '▓' * (bar_len - filled_len) | |
sys.stdout.write('==> {} {}{} ... {}'.format(bar, percents, '%', suffix), ending='\r') | |
sys.stdout.flush() |
# vim: fileencoding=utf-8 tw=100 expandtab ts=4 sw=4 : | |
# | |
# GoodMorningPlanet.com | |
# author : Vincent Loy <[email protected]> | |
# (c) 2015 ActivKonnect | |
""" | |
Repair bad formatted Markdown Files - replace **foo** by #foo | |
only when a line start and end by strong tag | |
""" |
# vim: fileencoding=utf-8 tw=100 expandtab ts=4 sw=4 : | |
# | |
# monty-hall-problem | |
# copyright (c) 2015 Vincent Loy | |
# Vincent Loy <[email protected]> | |
import random | |
class MontyHall: | |
def __init__(self): |