Skip to content

Instantly share code, notes, and snippets.

View nick2474's full-sized avatar

Didierh nick2474

View GitHub Profile
@doopz
doopz / Install Odoo 12 Instructions.md
Last active November 2, 2021 22:45
Install Odoo 12 on Ubuntu 18.04 with Nginx and Letscrypt

Install Odoo 12 Instructions

Update OS

sudo apt update && sudo apt upgrade
sudo apt autoremove

Install Postgress

{
// 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": "Odoo: Attach",
"type": "python",
"request": "attach",
I encountered following errors during Ubuntu OS upgrade from 14.04 to 16.04:
ImportError: No module named 'pypdf2'
ImportError: No module named 'passlib'
ImportError: No module named 'babel'
ImportError: No module named 'werkzeug'
ImportError: No module named 'decorator'
ImportError: No module named 'dateutil'
ImportError: No module named 'psycopg2'
ImportError: No module named 'psutil'
[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
@jwo
jwo / map.js
Last active March 31, 2022 10:41
React google maps with multiple markers, only one info window
import React, { Component } from "react"
import { compose } from "recompose"
import {
withScriptjs,
withGoogleMap,
GoogleMap,
Marker,
InfoWindow
} from "react-google-maps"
@pedro-santiago
pedro-santiago / migrate.sh
Last active November 18, 2020 22:20 — forked from gghughunishvili/migrate1.sh
Upgrade MAMP 4 to Mysql 5.7.18 (on Sierra tested)
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-macos10.12-x86_64.tar.gz
tar xfvz mysql-5.7.18-macos10.12-x86_64.tar.gz
echo "Stopping MAMP"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "Copy Bin"
@corsonr
corsonr / create-woocommerce-order-dynamically.php
Created April 4, 2017 10:03
Create a WooCommerce Order Dynamically
<?php
/*
* Create order dynamically
*/
add_action( 'woocommerce_before_checkout_form', 'create_order' );
function create_order() {
global $woocommerce;
/**
* @Title: Woocommerce Add a product to the cart programmatically
* @Author: Mina Pansuriya
* @Website: http://minapansuriya.com
* @Blog URL: http://minapansuriya.com/woocommerce-add-a-product-to-the-cart-programmatically/
*/
add_action( 'template_redirect', 'pbs_woo_add_gift_product_to_the_cart' );
function pbs_woo_add_gift_product_to_the_cart() {
$isAddGiftF = false;
@romuald
romuald / processlist.sql
Last active April 16, 2024 20:15
Show PostgreSQL current (running) process list;
SELECT user, pid, client_addr, waiting, query, query_start, NOW() - query_start AS elapsed
FROM pg_stat_activity
WHERE query != '<IDLE>'
-- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1
ORDER BY elapsed DESC;