See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.json
file in/etc/docker
:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
from app import db | |
from sqlalchemy import func | |
from sqlalchemy.dialects.mysql import insert | |
def upsert(model, insert_dict): | |
"""model can be a db.Model or a table(), insert_dict should contain a primary or unique key.""" | |
inserted = insert(model).values(**insert_dict) | |
upserted = inserted.on_duplicate_key_update( | |
id=func.LAST_INSERT_ID(model.id), **{k: inserted.inserted[k] | |
for k, v in insert_dict.items()}) |
<?php | |
wp_embed_register_handler( 'gist', '/https?:\/\/gist\.github\.com\/([a-z0-9]+)\/([a-z0-9]+)?/i', 'joseconti_embed_gist' ); | |
function joseconti_embed_gist( $matches, $attr, $url, $rawattr ) { | |
$embed = sprintf( | |
'<script src="https://gist.github.com/%1$s/%2$s.js"></script>', | |
esc_attr( $matches[1] ), | |
esc_attr( $matches[2] ) | |
); |
import os | |
import sys | |
import yaml | |
import pprint | |
import base64 | |
import requests | |
import plone.api | |
from requests.auth import HTTPBasicAuth | |
from Testing.makerequest import makerequest |
[options] | |
# | |
# WARNING: | |
# If you use the Odoo Database utility to change the master password be aware | |
# that the formatting of this file WILL be LOST! A copy of this file named | |
# /etc/odoo/openerp-server.conf.template has been made in case this happens | |
# Note that the copy does not have any first boot changes | |
#----------------------------------------------------------------------------- | |
# Odoo Server Config File - TurnKey Linux |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json
file in /etc/docker
:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
root@openedx:/edx/app/edxapp/edx-platform$ git tag | grep "open-release" | tail -1 | |
open-release/ginkgo.1rc1 |
# These examples assume you have a container currently running. | |
# 1 Pipe from a file | |
sudo docker exec --interactive CONTAINER_NAME /bin/bash < the_beginning.sh | tee the_beginning_output.txt` | |
#2a Pipe by piping | |
echo "echo This is how we pipe to docker exec" | sudo docker exec --interactive CONTAINER_NAME /bin/bash - |
/* | |
* Ejemplo de tipo abstracto para gestionar lista de alumnos | |
* Cada alumno tiene un nombre y una edad | |
*/ | |
// Internamente se representan como una sola lista | |
let alumnos = []; | |
// Se inicializan un par de valores | |
alumnos.push({ "nombre": "pepe", "edad": 23 }); |
#!/bin/bash | |
################################################################################ | |
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04 (could be used for other version too) | |
# Author: Yenthe Van Ginneken | |
#------------------------------------------------------------------------------- | |
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances | |
# in one Ubuntu because of the different xmlrpc_ports | |
#------------------------------------------------------------------------------- | |
# Make a new file: | |
# sudo nano odoo-install.sh |
#!/bin/bash | |
# CONST 1GB | |
CONST_1GB="1024*1024*1024" | |
# VARIABLE WORKERS | |
CMD_W=0 |