A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
A list of amazingly awesome PHP libraries, resources and shiny things.
<?php | |
$idade = trim($_POST['idade']); | |
$erro = false; | |
if (empty($idade)) { | |
$erro = 'Idade não pode ser vazia'; | |
} elseif (! is_numeric($idade)) { | |
$erro = 'Idade deve ser numérica'; | |
} elseif ($idade < 18) { |
# prompt style and colors based on Steve Losh's Prose theme: | |
# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme | |
# | |
# vcs_info modifications from Bart Trojanowski's zsh prompt: | |
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt | |
# | |
# git untracked files modification from Brian Carper: | |
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt | |
PR_GIT_UPDATE=1 |
body { | |
font-family: Sans-serif; | |
color: #333; | |
} | |
h1 { | |
text-align: center; | |
} | |
.erro { |
ntpdate 0.br.pool.ntp.org |
Available packages (APT): | |
r-base | |
r-cran-ggplot2 | |
r-cran-lme4 | |
r-cran-reshape | |
r-cran-xml | |
CRAN only: |
# Detele | |
couchbase-cli bucket-delete -c 127.0.0.1 -u Administrator -p mypassword --bucket=mybucket-to-delete | |
# Create | |
couchbase-cli bucket-create -c 127.0.0.1 -u Administrator -p mypassword --bucket=default --bucket-ram=300 | |
# Restore | |
cbrestore default http://127.0.0.1:8091 -B default |
I hereby claim:
To claim this, I am signing this object:
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/"): | |
data = [] | |
data["title"] = "My Page" | |
data["description"] = "Just a Page" | |
return render_template("index.html", **data) |
from flask import Flask, redirect, url_for | |
app = Flask(__name__) | |
@app.route("/page_to_redirect") | |
def page_to_redirect(): | |
"""Using a 307 (TEMPORARY REDIRECT)""" | |
return redirect(url_for("destination")), 307 | |