Skip to content

Instantly share code, notes, and snippets.

View akevinieron's full-sized avatar

Kevin Jimenez akevinieron

  • Santo Domingo, República Dominicana
View GitHub Profile
@akevinieron
akevinieron / docker-compose.yml
Created May 17, 2023 19:57
Docker Compose - Security Server - X-Road v7
version: "3.9"
services:
ss:
image: niis/xroad-security-server-sidecar:7.2.2
networks:
xroad_net:
ports:
- "4000:4000"
- "5500:5500"
- "5577:5577"
@akevinieron
akevinieron / delete_git_submodule.md
Created February 16, 2022 18:12 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@akevinieron
akevinieron / .gitignore
Created February 4, 2021 17:42
Gitignore by Odoo proyects
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
[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
@akevinieron
akevinieron / ct-clone.sh
Created July 22, 2019 05:24
This script is for container cloning on Proxmox 5
pct clone <id_to_clone> <id_new_ct> --full true --hostname <some_hostname> --snapname <some_snapshot_name>
pct set <id_new_ct> --net0 name=eth0,bridge=vmbr2,ip=dhcp,type=veth --onboot true --memory 4096 --cores 4 --description ""
@akevinieron
akevinieron / 001_odoo11_html_company_dependent.patch
Created April 30, 2019 05:38
[PATCH] Adding html field to list of fields to avoid html field
From f78a2758c5d26f82aa91e2793f16b4d8036584a7 Mon Sep 17 00:00:00 2001
From: Kevin Jimenez <[email protected]>
Date: Tue, 30 Apr 2019 04:58:23 +0000
Subject: [PATCH] Adding html field to list of fields to avoid html field
company_dependent error
---
odoo/addons/base/res/ir_property.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@akevinieron
akevinieron / docker-compose.yml
Created February 17, 2019 18:25
Docker compose - Pycaribbean demo
version: '3'
services:
odoodb:
image: postgres:10
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- POSTGRES_DB=postgres
volumes:
@akevinieron
akevinieron / date_compare.py
Created August 31, 2018 22:21 — forked from ilyasProgrammer/date_compare.py
Odoo compare datetime and date in domain. Current day, week, month, year in domain.
# in xml:
# Current day:
domain="[('some_date_time', '&gt;', (context_today()-datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d')),('start_time', '&lt;', (context_today()+datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d'))]
# Current week:
domain="[('some_date_time', '&gt;=', (context_today()-datetime.timedelta(days=context_today().weekday())).strftime('%%Y-%%m-%%d')),('start_time', '&lt;=', (context_today()-datetime.timedelta(days=context_today().weekday())+ datetime.timedelta(days=6)).strftime('%%Y-%%m-%%d'))]
# Current year:
domain="[('some_date_time', '&gt;=', (datetime.date(datetime.date.today().year, 1, 1)).strftime('%%Y-%%m-%%d')),('start_time', '&lt;=', (datetime.date(datetime.date.today().year, 12, 31)).strftime('%%Y-%%m-%%d'))]
#in python:
yesterday = datetime.datetime.now() - datetime.timedelta(days = 2)
/**
* PHP version 5
* @package AzulPaymentGateway
* @author ideologic SRL <[email protected]>
* @since File available since Release 1
*/
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
use DB;