Skip to content

Instantly share code, notes, and snippets.

View jayadianto's full-sized avatar

Jaya Dianto jayadianto

View GitHub Profile

Step 1 - Add the Odoo repository

yum install -y epel-release
yum-config-manager --add-repo=https://nightly.odoo.com/10.0/nightly/rpm/odoo.repo
yum update && yum install odoo

enable odoo services

masuk ke database, execute this:
DELETE FROM ir_attachment WHERE url LIKE '/web/content/%';
restart Odoo
==== UNTUK ODOO 18 ====
@jayadianto
jayadianto / gist:ad0f8d4572b7b7824046d1c10f57f840
Last active February 1, 2023 08:32
Upgrade nodejs version on macos
  1. sudo npm cache clean -f (force) clear you npm cache
  2. sudo npm install -g n install n (this might take a while)
  3. sudo n stable upgrade to the current stable version

source : https://stackoverflow.com/a/19333717

@jayadianto
jayadianto / gist:479de826a33822003be840e6aecf7fc9
Last active September 15, 2022 09:01
ODOO PERFORMANCE TRAINING

A. Infrastruktur

IP OS Info CPU RAM PURPOSE
34.87.143.81 Ubuntu 18.04.6 LTS 4 CORE 8GB Postgres Instance
34.124.179.57 Ubuntu 18.04.6 LTS 2 CORE 4GB Odoo Instance
34.124.251.112 Debian bullseye 2 CORE 4GB Nginx Instance
34.126.139.122 Debian bullseye 2 CORE 4GB PgBouncer Instance
@jayadianto
jayadianto / 403.html
Last active February 14, 2022 03:15
ODOO XMLRPC API
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>404 Page not Found</title>
<style>
.fundo{
animation: scales 3s alternate infinite;
transform-origin: center;

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.

Step 1 - Add the Odoo repository

wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
echo "deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >> /etc/apt/sources.list
apt-get update

Step 2 - Configure a Linux user for Odoo

@jayadianto
jayadianto / strip_word_html.php
Created May 23, 2018 22:36 — forked from dave1010/strip_word_html.php
Strip MS Word HTML. From php.net
<?php
function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>')
{
mb_regex_encoding('UTF-8');
//replace MS special characters first
$search = array('/&lsquo;/u', '/&rsquo;/u', '/&ldquo;/u', '/&rdquo;/u', '/&mdash;/u');
$replace = array('\'', '\'', '"', '"', '-');
$text = preg_replace($search, $replace, $text);
//make sure _all_ html entities are converted to the plain ascii equivalents - it appears
//in some MS headers, some html entities are encoded and some aren't
$(function() {
var map = new google.maps.Map(document.getElementById("map_canvas"), {});
var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687);
var googleMapWidth = $("#map_canvas").css('width');
var googleMapHeight = $("#map_canvas").css('height');
map.setCenter(newyork);
$('#enter-full-screen').click(function(){
#
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!