Skip to content

Instantly share code, notes, and snippets.

View W360S's full-sized avatar

World 360° Services W360S

View GitHub Profile
@W360S
W360S / Install Postgres and first login DB
Created March 13, 2018 06:25
Install Postgres and first login DB
Setting a password for the postgres user
On Linux systems, there is no default password set.
To set the default password:
Run the psql command from the postgres user account:
sudo -u postgres psql postgres
Set the password:
@W360S
W360S / W360S Core Fixed
Created December 27, 2017 09:48
W360S Core Fixed
IMPORTANT:
-----------------------------------------------------------------------------------------
Please be sure to read the Important Update Notes before you update:
http://theme-fusion.com/avada-doc/install-update/important-update-information/
We are always proactive in preventing security issues, however nobody can assume they will never come up.
This is why we highly recommend to stay up to date with each new theme version and plugins.
-----------------------------------------------------------------------------------------
Version 5.4 - December 19th, 2017
it is not that simple, Odoo code still depends on the old unmaintained python-pypdf
However, there is an easy workaround : create a fake python-pdf package and install python-pyPdf from Pipy (Python repository). All of this will be done as root :
install equivs to create fake packages and python-pipto install package from Python repository
run equivs-control python-pypdf, this will create and populate the file python-pypdf
edit the file like below (dot and space under "Description" are mandatory) :
Section: python
Package: python-pypdf
Version: 1.13
@W360S
W360S / fixd odoo invalid database name
Created September 26, 2017 13:48
fixd odoo invalid database name
cd path/to/odoo
sed -i 's/matches="[^"]*"//g' addons/web/static/src/xml/base.xml
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 677, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 333, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 326, in checked_call
cd /usr/local/src/
curl https://curl.haxx.se/download/curl-7.51.0.tar.gz | tar xvz
# wget http://www.openssl.org/source/openssl-1.0.2.tar.gz
# tar -xzvf openssl-1.0.2k.tar.gz
cd curl-7.51.0
./configure --with-openssl=/usr/local/src/openssl-1.0.2 && make && make install
curl -V
@W360S
W360S / recompile-nginx-on-CentOS-to-support-HTTP-2
Created February 13, 2017 17:34
recompile-nginx-on-CentOS-to-support-HTTP-2
# recompile-nginx-on-CentOS-to-support-HTTP-2
In CentOS command line, or an SSH terminal and enter the following command (note the uppercase letter V):
nginx -V
nginx version: nginx/1.10.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-file-aio --with-threads --with-ipv6 --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-ht
@W360S
W360S / find command
Created February 13, 2017 08:53
find / -xdev 2>/dev/null -name "website_templates.xml"
find / -xdev 2>/dev/null -name "website_templates.xml"
@W360S
W360S / Chown File Permission
Created August 22, 2016 07:59
Chown File Permission
chmod Wordpress
find . -type d -exec chmod 755 '{}' \;
find . -type f -exec chmod 644 '{}' \;
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},sl