Skip to content

Instantly share code, notes, and snippets.

View ygol's full-sized avatar

Yves Goldberg ygol

View GitHub Profile
[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
@ygol
ygol / git-pull-recursive.rb
Created November 7, 2020 09:58 — forked from jonpugh/git-pull-recursive.rb
Lots of repos? Try "git-pull-recursive" to run "git pull" on all subfolders with a .git folder inside. Thanks to http://snipplr.com/view/62314/perform-git-pull-on-subdirectory-recursive/
# For use in Chef:
# Adds a command: git-pull-recursive
file "/usr/local/bin/git-pull-recursive" do
owner "root"
group "root"
mode "0755"
action :create
content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;'
end
0x8d0dcb3Df3cbEc04e419CEe241D2170a992a2196
@ygol
ygol / ezdropdb
Created June 23, 2017 12:22
Drop databases selectively by matching any part of the name. (https://github.com/Kraymer/ezdropdb)
#!/bin/bash
# Copyright (c) 2017 Fabrice Laporte - kray.me
# The MIT License http://www.opensource.org/licenses/mit-license.php
# ezdropdb
# Removes PostgreSQL databases selectively by matching any part of the name.
readonly PROGNAME=$(basename $0)
@ygol
ygol / gist:2770d4a28ca8d2902b37330498aa6238
Created May 25, 2016 17:13
add a specific user as follower.py
# Replace "15" by the ID of the user.
# It also works with a list of users ids. For example: [15,12,5]
self.message_subscribe(cr, uid, [object.id], [15], context=context)
@ygol
ygol / odoo-v8-nginx-proxy.conf
Created May 14, 2016 09:55 — forked from andrius-preimantas/odoo-v8-nginx-proxy.conf
Nginx proxy configuration for Odoo v8
upstream odoo8 {
server 0.0.0.0:8069 weight=1 fail_timeout=0;
}
upstream odoo8-im {
server 0.0.0.0:8072 weight=1 fail_timeout=0;
}
## http redirects to https ##
server {
@ygol
ygol / nginx_odoo_multiprocess
Created April 28, 2016 13:28 — forked from funbaker/nginx_odoo_multiprocess
odoo nginx static files
upstream odoo9_xmlrpc {
server <xmlrpc address>;
}
upstream odoo9_longpolling {
server <longpolling address>;
}
server {
listen 80;
@ygol
ygol / PG::Error: ERROR: new encoding (UTF8) is incompatible
Created March 17, 2016 13:47 — forked from amolkhanorkar/PG::Error: ERROR: new encoding (UTF8) is incompatible
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
<table cellspacing="0" cellpadding="10" border="0">
<tr>
<td width="80"></td>
<td width="280"></td>
</tr>
@ygol
ygol / install-odoo.sh
Created February 9, 2016 17:07 — forked from yelizariev/install-odoo.sh
install odoo from source
if [ "$(basename $0)" = "install-odoo.sh" ]; then
echo "don't run install-odoo.sh, because it's not fully automated script. Copy, paste and execute commands from this file manually"
exit 0
fi
#### Detect type of system manager
export SYSTEM=''
pidof systemd && export SYSTEM='systemd'