Skip to content

Instantly share code, notes, and snippets.

View ajepe's full-sized avatar
🏠
Working from home

Babatope Ajepe ajepe

🏠
Working from home
View GitHub Profile
@ajepe
ajepe / install-wkhtmltopdf.sh
Created December 20, 2022 10:30 — forked from yajra/install-wkhtmltopdf.sh
Install wkhtmltopdf 0.12.4 (with patched qt)
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
mv wkhtmltox/bin/wkhtmlto* /usr/bin/
ln -nfs /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
@ajepe
ajepe / postgres_bacnkup
Last active December 25, 2022 05:59 — forked from wikiti/bash.sh
Backup and restore in PostgreSQL using compressed backups.
# List databases
sudo su postgres
psql
\list
# Create a compressed backup
sudo su postgres
pg_dump -Fc <database_name> > <file>
# Example
@echo off
title Activate Windows 10 ALL versions for FREE!&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Windows 10 Home&echo - Windows 10 Home N&echo - Windows 10 Home Single Language&echo - Windows 10 Home Country Specific&echo - Windows 10 Professional&echo - Windows 10 Professional N&echo - Windows 10 Education&echo - Windows 10 Education N&echo - Windows 10 Enterprise&echo - Windows 10 Enterprise N&echo - Windows 10 Enterprise LTSB&echo - Windows 10 Enterprise LTSB N&echo.&echo.&echo ============================================================================&echo Activating your Windows...&cscript //nologo slmgr.vbs /ckms >nul&cscript //nologo slmgr.vbs /upk >nul&cscript //nologo slmgr.vbs /cpky >nul&set i=1&wmic os | findstr /I "enterprise" >nul
if %errorlevel% EQU
@ajepe
ajepe / migrate.py
Created February 28, 2021 22:03 — forked from DhruvaDave/migrate.py
#!/usr/bin/env python2
import os
import sys
import StringIO
import psycopg2
import psycopg2.extensions
from optparse import OptionParser
from ConfigParser import SafeConfigParser
try:
@ajepe
ajepe / einvoice.py
Created December 8, 2020 15:23 — forked from alcidesrivera/einvoice.py
Electronic Document SRI Ecuador
# -*- coding: utf-8 -*-
##############################################################################
#
# E-Invoice Module - Ecuador
# Copyright (C) 2014 VIRTUALSAMI CIA. LTDA. All Rights Reserved
# alcides@virtualsami.com.ec
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ajepe
ajepe / README.md
Created August 22, 2020 19:56 — forked from clhenrick/README.md
PostgreSQL & PostGIS cheatsheet (a work in progress)
@ajepe
ajepe / Virtual Box Host Only Static IP.md
Created June 14, 2020 14:22 — forked from pjdietz/Virtual Box Host Only Static IP.md
VirtualBox Host-Only Adapter with Static IP

VirtualBox Host-Only Static IP

My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.

To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)

Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.

Temporary

@ajepe
ajepe / main.py
Created May 28, 2020 09:36 — forked from mlaitinen/main.py
Odoo 12 Prometheus instrumentation
##############################################################################
#
# Author: Miku Laitinen / Avoin.Systems
# Copyright 2019 Avoin.Systems
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
@ajepe
ajepe / odoo-requests
Created December 1, 2019 08:14 — forked from dreispt/odoo-requests
Munin plugins for Odoo
#!/bin/sh
#%# family=manual
#%# capabilities=autoconf suggest
# Munin plugin for transactions/minute
case $1 in
autoconf)
exit 0
;;
suggest)