This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |