Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Babatope Ajepe ajepe

🎯
Focusing
Block or report user

Report or block ajepe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ajepe
ajepe / odoo-requests
Created Dec 1, 2019 — forked from dreispt/odoo-requests
Munin plugins for Odoo
View odoo-requests
#!/bin/sh
#%# family=manual
#%# capabilities=autoconf suggest
# Munin plugin for transactions/minute
case $1 in
autoconf)
exit 0
;;
suggest)
@ajepe
ajepe / upgrade-postgres-9.6-to-10.md
Created Nov 8, 2019 — forked from mdesantis/upgrade-postgres-9.6-to-10.md
Upgrading PostgreSQL from 9.6 to 10 on Ubuntu 16.04
View upgrade-postgres-9.6-to-10.md

TL;DR

Install Postgres 10, and then:

sudo pg_dropcluster 10 main --stop
sudo pg_upgradecluster 9.6 main
sudo pg_dropcluster 9.6 main
View kill all
kill $(ps aux | grep 'odoo' | awk '{print $2}')
@ajepe
ajepe / constraint.sql
Created Oct 21, 2019
Check list of constraint on a table
View constraint.sql
SELECT con.* FROM pg_catalog.pg_constraint con INNER JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid INNER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = connamespace WHERE nsp.nspname = 'public' AND rel.relname = 'product_product';
@ajepe
ajepe / database.sql
Created Oct 16, 2019
Get database size
View database.sql
select t1.datname AS db_name,
pg_size_pretty(pg_database_size(t1.datname)) as db_size
from pg_database t1
order by pg_database_size(t1.datname) desc;
View Wget Crawl
wget -P build -nv -nH -r -E localhost:3000
@ajepe
ajepe / nginx
Created Apr 15, 2019
Odoo basic nginx conf
View nginx
#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
# http -> https
# server {
@ajepe
ajepe / md
Created Jan 15, 2019
Nigeria Banks sort code
View md
{
"070010": "ABBEY MORTGAGE BANK-070010",
"044": "ACCESS BANK PLC-044",
"323": "AccessMobile-100013",
"090134": "ACCION MICROFINANCE BANK-090134",
"090160": "ADDOSSER MICROFINANCE BANK-090160",
"100028": "AG MORTGAGE BANK PLC-100028",
"090133": "AL-BARAKAH MICROFINANCE BANK-090133",
"090180": "AMJU UNIQUE MICROFINANCE BANK-090180",
"090116": "AMML MFB-090116",
View gist:fdb8851684a058f254d4883bfb7ff79a
curl -gkvLI -H 'User-Agent: updown.io daemon 2.2' -H 'Accept: */*' -H 'Connection: Close' -H 'Accept-Language: en' -m 30 --connect-timeout 5 http://odoosme.ng
You can’t perform that action at this time.