Skip to content

Instantly share code, notes, and snippets.

View mao-odoo's full-sized avatar

Moens Alexandre mao-odoo

  • Belgium, Grand-Rosière-Hottomont
View GitHub Profile
@mao-odoo
mao-odoo / noweb_alias.sh
Last active November 11, 2018 10:49 — forked from isakb/install_ni_prefix.sh
alias "noweb" : prefix to disable outgoing web requests for specific commands
# alias "noweb" : prefix for executing scripts without allowing outgoing web requests.
#
# Original idea from http://ubuntuforums.org/showthread.php?t=1188099
#
# no warranties use at own risk
# made for zsh, not tested with other shells
# to prepare for the use of this alias/iptable rule combo :
# groupadd no_web
# usermod -a -G no_web $USER
BEGIN;
-- list of projects to act upon
CREATE TABLE tmp_mig_2_helpdesk (pid INT, aliasid INT, stage varchar DEFAULT 'not started yet', time time DEFAULT now());
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (7, 13); --test 1 (113)
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (13, 33); --test 2 (113)
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (12, 33); --test 1 (114)
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (13, 34); --test 2 (114)
INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (49, 31); -- Help
INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (1276, 1300976); -- PS maintenance
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (XXX, XXX); -- [PS] Technical Support
@mao-odoo
mao-odoo / create_ab.sh
Created May 31, 2019 08:57 — forked from nvn-odoo/create_ab.sh
Creates a database with schema 'a' and schema 'b' containing databases given in parameters
#!/bin/bash
# This tool creates a database $3 from database $1 and database $2
# database $1 will ends in the schema a
# database $2 will ends in the schema b
# this will allow comparisons between two schemas in the same database
if [ "$1" = "" ]; then
echo "USAGE: $0 <DBNAME_A> <DBNAME_B> <DBNAME_AB>" >&2
exit 1
@mao-odoo
mao-odoo / http_server_auth.py
Last active January 23, 2024 09:53 — forked from mauler/http_server_auth.py
Python3 http.server supporting basic HTTP Auth (username/password (mandatory))
#!/usr/bin/env python3
# Extended python -m http.serve with --username and --password parameters for
# basic auth, based on https://gist.github.com/fxsjy/5465353
from functools import partial
from http.server import SimpleHTTPRequestHandler, test
import base64
import os