Skip to content

Instantly share code, notes, and snippets.

View repodevs's full-sized avatar

Edi Santoso repodevs

View GitHub Profile
@repodevs
repodevs / README.md
Created January 13, 2025 09:04
Compress Video Size using ffmpeg

Usage

Download file video_compressor.sh

Make it Executeable by chmod +x video_compressor.sh

Run the script ./video_compressor.sh source_video 15

  • 15 is target new size in MB
@repodevs
repodevs / README.md
Created December 14, 2024 19:28
Bash script for upgrade odoo addons

Usage of upgrade_addons.sh script

  • Download it
  • Make it Executeable with chmod +x upgrade_addons.sh
  • Use it
./upgrade_addons.sh DATABASE ADDONS_A_TO_UGRADE,ADDONS_B_TO_UPGRADE
@repodevs
repodevs / odoo16multi.nginx.conf
Created December 14, 2024 15:34
Odoo 16 multi server inside Load Balancer and proxy nginx config
## [public internet] -> [Load Balancer: e.g Alicloud SLB, AWS ELB, etc] -> [nginx proxy] -> [odoo service]
#odoo server
upstream odoo {
least_conn;
server 127.0.0.1:8079;
server 172.16.116.10:8079; # server prod 2
# server 172.16.116.10:8079 down; # exclude from load balance
# add more server here
}
@repodevs
repodevs / install.txt
Last active June 11, 2024 09:02
Odoo 17+ Install Development for Mac M1
when erorr mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')
do
$ cd path/to/odoo
$ pip install -r requirements.txt
# uninstall packagaes that not compatile with M1
$ pip uninstall psycopg2 lxml libsass -y
# re-install using arch64
@repodevs
repodevs / NOTES.md
Last active November 2, 2024 03:30
Odoo OCA queue_job to comply with pgBouncer

EDITED

Use bellow config in your odoo.conf to make it works by bypassing pgbouncer for queue_job

[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
db_host=pgbouncer
db_name = odoo
@repodevs
repodevs / stock_move.py
Created October 22, 2022 22:24 — forked from ahmedelbougha/stock_move.py
Example of Odoo Multi-Threading - Background Process
from odoo import api, fields, models
from odoo.tools import float_is_zero
from odoo.exceptions import UserError, ValidationError
import threading
import time
import logging
class StockMove(models.Model):
_inherit = 'stock.move'
@repodevs
repodevs / wsl-debian-error.md
Created May 18, 2021 08:02
WSL 2 docker debian error when apt-get update

When Docker Desktop installed on Windows and WSL 2 activated and then the compute hibernate. the date inside the docker will not up to date with the host. this issue will cause error in debian container (for exampe: doing apt update)

to solve the error, update the clock with

wsl -d docker-desktop hwclock -s in CMD.

ref: microsoft/WSL#4114 (comment)

@repodevs
repodevs / gist:82566dafaf515d32a1832812ac2bd773
Created January 27, 2021 15:20
Linux command to watch bandwidth usage using ifstat
$ ifstat -ntS -i eth0
@repodevs
repodevs / latest-opera-instant-search.txt
Created January 9, 2021 08:32
Latest Opera browser that has Instant Search feature
Download Latest Opera Browser that has Instant Search feature at http://get.opera.com/ftp/pub/opera/desktop/67.0.3575.97/
@repodevs
repodevs / docker-in-docker.md
Last active January 1, 2021 06:47
Run Docker inside Docker Ubuntu Images

Run Docker inside Docker Ubuntu Images

The story begin when I want to install docker inside mltooling/ml-workspace-minimal images, which is based on ubuntu 18. so here how to run docker inside docker ubuntu images

docker run -d --name mltool \ 
  -p 8080:8080 \ 
  -v /root:/workspace \ 
 -v /var/run/docker.sock:/var/run/docker.sock \