import flask_sqlalchemy | |
from sqlalchemy import schema | |
from sqlalchemy.ext.compiler import compiles | |
db = flask_sqlalchemy.SQLAlchemy() | |
class Tag(db.Model): | |
__table_args__ = {'info': {'without_rowid': True}} | |
text = db.Column(db.String, primary_key=True) |
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
Lien vers l'offre OVH Public Cloud Object Storage : https://www.ovh.com/fr/cloud/storage/object-storage.xml
Pour utiliser l'API OpenStack Swift il faut récupérer des identifiants uniquement disponible dans l'interface Horizon
###1 - Créer un accès à Horizon
Dans l'espace client OVH : https://www.ovh.com/manager/cloud/login/
La méthode présentée ici permet d'installer un site Django sur un hébergement mutualisé OVH.
Lisez d'abord le fichier README
puis copiez les fichiers .htaccess
et django.cgi
vers votre
hébergement, ainsi que le code source de Django et le code source de votre site web.
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
import json, datetime | |
class RoundTripEncoder(json.JSONEncoder): | |
DATE_FORMAT = "%Y-%m-%d" | |
TIME_FORMAT = "%H:%M:%S" | |
def default(self, obj): | |
if isinstance(obj, datetime.datetime): | |
return { | |
"_type": "datetime", | |
"value": obj.strftime("%s %s" % ( |
<?php | |
/** | |
* Link Pages | |
* @author toscha | |
* @link http://wordpress.stackexchange.com/questions/14406/how-to-style-current-page-number-wp-link-pages | |
* @param array $args | |
* @return void | |
* Modification of wp_link_pages() with an extra element to highlight the current page. | |
*/ | |
function bootstrap_link_pages( $args = array () ) { |