Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Olalekan Babawale obabawale

🎯
Focusing
View GitHub Profile
View Fixing Issues with accent function odoo
# 1. Modify your odoo.conf
unaccent = True
# *2. Execute on console*
sudo -u postgres psql -c "CREATE EXTENSION unaccent;"
sudo -u postgres psql -c "ALTER ROLE odoo SUPERUSER;"
@obabawale
obabawale / SSL.md
Last active May 5, 2021 — forked from gangsta/SSL.md
How to Setting Up a Comodo SSL Cert
View SSL.md

How to Set Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller who you trust.

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr

This gives you two files:

View gist:e9d1902e9590faada4cbdb68833a64e0
xargs -a requirements.txt -n 1 pip install
View PostgresRestore.md

Backup and Restore

What is it

Hopefully its clear to anyone reading this what backup and restore is in regards to your database. But, in case you're entirely new to databases and even more so computers, a backup is simply a full copy of your database schema and data, with restore being the ability to use that backed up data and load it into your database or another database.

Note: Backup and restore is done on an entire database or entire table, and not meant for extracts of data. In that case you would use copy.

Backup pg_dump is the utility for backing up your database. There are a few key knobs you have when dumping your database. These include:

View install_lessc.md

Install Less compiler on Ubuntu 17.10

  1. Install node package

sudo apt-get install npm

  1. Install less using node package manager

npm install less -g

@obabawale
obabawale / setup_mailcatcher.sh
Created Jun 22, 2018 — forked from shark0der/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
View setup_mailcatcher.sh
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
gem install mailcatcher
@obabawale
obabawale / oauth_10a_curl.sh
Created Mar 24, 2018 — forked from joslynesser/oauth_10a_curl.sh
OAuth 1.0a Curl Request
View oauth_10a_curl.sh
# Replace oauth_consumer_key with your consumer key
# Replace oauth_token with your access token
# Replace oauth_signature with "your_consumer_secret%26your_access_token_secret"
# Note that the oauth_nonce must change and be unique for every request
curl -X GET 'https://yoursite.desk.com/api/v1/account/verify_credentials.json' -H 'Authorization: OAuth oauth_version="1.0",oauth_timestamp=1321473112,oauth_nonce=937459123,oauth_signature_method="PLAINTEXT",oauth_consumer_key="nMu4u9pLRfDrxhPVK5yn",oauth_token="ivouGxpsJbyIU5viPKOO",oauth_signature="vLr9MjzowzVwbvREpWhIVQMJQI0G7Pin6KHCoXak%26igQY0L2bcbwonZTC4kG5ulZxTMTDW0K0zIyceSuF"'
View install-postgres-10-ubuntu.md

Install PostgreSQL 10 on Ubuntu

This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.

(Optional) Uninstall other versions of postgres

To make life simple, remove all other versions of Postgres. Obviously not required, but again, makes life simple.

dpkg -l | grep postgres
View How to expand a .vmdk virtual harddisk
1. Change to the oracle virtualbox directory where you can run VBoxManage command
cd "C:\Program Files\Oracle\VirtualBox"
2. Clone the .vmdk file to a new .vdi file
VBoxManage clonehd "C:\Users\Somebody\VirtualBox VMs\Windows7\windows7.vmdk" "C:\Users\Somebody\VirtualBox VMs\Windows7\windows7.vdi" --format vdi
3. Run the next command to expand the cloned vdi disk. For instance, to expand to 50GB, do:
VBoxManage modifyhd "C:\Users\Somebody\VirtualBox VMs\Windows7\windows7.vdi" --resize 51200
4. In case you want convert to the .vmdk format, clone the new .vdi disk to .vmdk
@obabawale
obabawale / Installing wkhtmltopdf on Linux
Created Aug 18, 2017
How to install wkhtmltopdf.tar.xz on Linux Ubuntu systems
View Installing wkhtmltopdf on Linux
download=http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
wget $download -O wkhtmltox.tar.xz
tar xf wkhtmltox.tar.xz
sudo mv wkhtmltox/bin/* /usr/local/bin/
rm -Rf wkhtmltox*