Skip to content

Instantly share code, notes, and snippets.

@arif-m150
arif-m150 / git-cheat-sheet.md
Created January 4, 2023 04:19
git-cheat-sheet

Go one step back in history

git checkout @~1

Show commit changes

git show <commit-sha>
@arif-m150
arif-m150 / install_pyenv_mac_zsh.rst
Last active December 26, 2022 02:05 — forked from josemarimanio/install_pyenv_mac_zsh.rst
Installing pyenv on macOS for Zsh using Homebrew
@arif-m150
arif-m150 / Config debug Odoo in Visual Studio Code.json
Last active September 16, 2022 08:58
Config debug Odoo in Visual Studio Code
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Run Odoo",
"type": "python",
"request": "launch",
@arif-m150
arif-m150 / PostgreSQL Configuration to Allow access from outside network.md
Last active September 14, 2022 01:59
PostgreSQL Configuration to Allow access from outside network
  cd /etc/postgresql/14/main/

open file named postgresql.conf

add this line to that file

  listen_addresses = '*'
 port = 5432
@arif-m150
arif-m150 / How to Install Odoo 15 on Debian or Ubuntu.md
Last active December 16, 2022 03:53
How to Install Odoo 15 on Ubuntu

Prerequisites

  • OS Linux Debian 11 (Bullseye), Ubuntu 20.04 (Focal) or above.
  • Access to the command line/terminal with sudo permissions.
  • Git installed.
  • Odoo requires Python 3.7 or later
  • Pip for Python 3 installed.
  • PostgreSQL (supported version: 10.0 and later)
  • NodeJS installed.

sudo apt install pgbouncer

Edit the pgbouncer configuration file /etc/pgbouncer/pgbouncer.ini

  * = host=localhost port=5432
  Set the listen_port = 5432 and listen_address = * 
  Set the auth_type = md5. 

Run below query in psql

A. Infrastructure

FQDN IP Purpose 1 Purpose 2
IT-RDBMS01.itenlight.com 10.1.10.150 Primary PostgreSQL instance Active pgpool-II instance
IT-RDBMS02.itenlight.com 10.1.10.155 Standby PostgreSQL instance Standby pgpool-II instance

Virtual IP that will be used is 10.1.10.159.

@arif-m150
arif-m150 / Github CICD.md
Created May 20, 2022 03:29 — forked from akhdaniel/Github CICD.md
Github CI/CD Setup

Overview

How to create a pipeline which checks your app's code quality -frequently, automatically, in the cloud - using GitHub Actions. Such as to lint, test and build your app hosted on GitHub.

Objectives

  • How to make a basic deploy pipeline for your code can setup quick, easily and for free.
  • It can run in the cloud whenever someone pushes to your repo. It will warn you when something fails. So in case you forgot to run tests locally or you edited in GitHub UI, you're covered.
  • GitHub supports a pipeline service called GitHub Actions, covered in this post.

Odoo Webservice API Context

Pada pembuatan aplikasi mobile yang terkoneksi ke Odoo dengan JSONRPC/XMLRPC seringkali kita perlu mendapatkan informasi stock dan harga per lokasi gudang atau harga barang per company jika Odoo nya sudah dibuat multi-company.

Artikel ini membahas bagaimana secara API jsonrpc/xmlrpc kita bisa untuk:

  • mendapatkan data quantity produk sesuai gudang, lokasi, atau company
  • mendapatkan harga produk sesuai price list

Create cluster

gcloud container clusters create "gke-px" \
--zone "asia-southeast1-a" \
--cluster-version "1.20.8-gke.900" \
--machine-type "n1-standard-4" \
--image-type "UBUNTU" \
--disk-type "pd-ssd" \
--disk-size "100" \