Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Leonardo J. Caballero G. macagua

🏠
Working from home
View GitHub Profile
@macagua
macagua / ipynb_to_gallery.py
Created April 26, 2023 22:04 — forked from chsasank/ipynb_to_gallery.py
Convert jupyter notebook to sphinx gallery notebook styled examples.
View ipynb_to_gallery.py
@macagua
macagua / upsert.py
Created April 1, 2023 22:25 — forked from vanpelt/upsert.py
Flask SqlAlchemy MySQL ON DUPLICATE KEY UPDATE returning auto increment id UPSERT HOTNESS
View upsert.py
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()})
@macagua
macagua / BOBTEMPLATES_ODOO.rst
Last active February 27, 2023 20:58
Bob Template for create addon to Odoo v15
View BOBTEMPLATES_ODOO.rst

bobtemplates.odoo

El paquete bobtemplates.odoo proporciona plantillas de mr.bob para generar paquetes para proyectos de addon para Odoo.


Instalar bobtemplates.odoo

@macagua
macagua / BOBTEMPLATES.rst
Last active February 16, 2023 13:57
Instalación de bobtemplates para Plone 5.2.11
View BOBTEMPLATES.rst

bobtemplates.plone

El paquete bobtemplates.plone proporciona plantillas de mr.bob para generar paquetes para proyectos de Plone.


Instalar bobtemplates.plone

@macagua
macagua / Instalar Plone 5.2.11 en Linux.rst
Last active February 20, 2023 16:24
Instalación de Plone 5.2.11 en Linux con zc.buildout usando el proyecto training_buildout
View Instalar Plone 5.2.11 en Linux.rst

Instalar dependencias

Actualizar dependencias base de Linux, ejecutando los siguientes comandos:

sudo apt-get update && sudo apt-get upgrade -y

Ubuntu

@macagua
macagua / index.md
Created October 13, 2022 04:22 — forked from erral/index.md
How to deploy Volto sites automatically in non-docker scenarios
@macagua
macagua / semantic-branch-names.md
Created October 12, 2022 14:38 — forked from seunggabi/semantic-branch-names.md
semantic-branch-names.md
View semantic-branch-names.md

Semantic Branch Names

See how a minor change to your branch name style can make you a better programmer.

Format: <type>/#<issueNumber>-<alias>

Example

@macagua
macagua / semantic-commit-messages.md
Created October 12, 2022 14:38 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@macagua
macagua / README.rst
Last active October 4, 2022 18:18
Install Odoo 8.0, Postgres 9.4, pgweb and wdb for Development environment
View README.rst

Install Postgres 9.4

Executing the following command:

$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres \
         --name challenge_db postgres:9.4
@macagua
macagua / doodba_cheatsheet.md
Last active September 19, 2022 18:44 — forked from michaelkarrer81/doodba_cheatsheet.md
[doodba tools] doodba tools and commands #doodba #odoo #docker #invoke #pre-commit
View doodba_cheatsheet.md

Installation

This project itself is just the template, but you need to install these tools to use it: