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/python3 | |
# -*- coding: utf-8 -*- | |
# pip3 install requests dnslib geoip2 geonamescache | |
# | |
import sys, os, base64 | |
import geoip2.database, geonamescache, geonamescache.mappers | |
import requests, dnslib | |
#import urllib.request, dns, dns.message | |
from pprint import pprint |
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
#!python3 | |
''' BSD 3-Clause License — but if it was useful to you, you may tell me :) | |
Copyright (c) 2016-2017, Alexandre Levavasseur | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright |
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
#!python3 | |
from uuid import UUID | |
from datetime import date | |
# https://github.com/d-fence/frit/blob/master/frit/fritutils/fsprobe.py | |
# https://gist.github.com/sque/dc7a057e66371717e921 | |
# https://en.wikipedia.org/wiki/GUID_Partition_Table | |
# https://github.com/n0fate/raw/blob/master/gpt_parser.py | |
# https://sourceforge.net/u/guikcd93/gptfdisk/ci/master/tree/parttypes.cc#l179 |
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/python3 | |
# -*- coding: utf-8 -*- | |
# Based on https://github.com/trapexit/mergerfs-tools/blob/master/src/fsck.mergerfs | |
# © 2016, Antonio SJ Musumeci <[email protected]> | |
# © 2016, Alexandre Levavasseur <[email protected]> | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. |
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
"""Produce a table of mounted file systems on UNIX. Tested on Solaris 2.6, | |
Redhat Linux 6.2 and HP-UX 10.20. | |
Copyright 2001 WideAwake Ltd. | |
Permission is granted to use or modify this code for any purpose. | |
WideAwake Ltd accepts no liability for any loss or damage caused by use of | |
this code.""" | |
# Found at http://www.gossamer-threads.com/lists/python/python/25546 | |
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
#!python3 | |
import sys, glob, os, re, datetime, time, json | |
import traceback | |
import arango | |
from arango import Arango | |
client = Arango(host="localhost", port=8529) | |
db = client.db('jeu') | |
types = ['combinaisons', 'masse-enjeu', 'participants', 'rapports-definitifs', 'courses', 'tirelire', 'reunion', 'pronostics-detailles', 'performances-detaillees'] |
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
#!python3 | |
# | |
# Alexandre Levavasseur - FIP16 | |
# Pour le groupe projet CO32B1 | |
# | |
# This work is licensed under a Creative Commons | |
# Attribution-NonCommercial-ShareAlike 4.0 International License | |
# | |
# Sources: | |
# https://docs.python.org/3/library/csv.html |
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
mkdir tcviz && cd tcviz | |
git clone https://github.com/ze-phyr-us/tcviz.git . | |
for i in 0.990 994; do | |
tc qdisc show dev eth$i > qdisc.$i | |
tc class show dev eth$i > qdisc.$i | |
tc filter show dev eth$i > filter.$i | |
./tcviz.py qdisc.$i class.$i filter.$i | dot -Tsvg -o $1.svg | |
done | |
# Pour le dernier pipe, on peut aussi C/C l'output de TCViz sur un autre serveur, genre cyric, pour y faire le rendu (ce que j'ai fait, surtout que graphviz n'est pas sur loli) |
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/sh | |
# Cannot be a subdir (at least on Alpine) | |
cert_dir=/usr/local/share/ca-certificates/ | |
cert_1=http://www.cacert.org/certs/root.crt | |
hash_1=3ecd6f84706512923d62fcd0340fb85c92f4d7067b66ef20d4ac41d9cabf3ff30173f1af0f3cbd6a8ce4222b9132df559fca8108b6c9ba527f93db9078d85119 | |
cert_2=http://www.cacert.org/certs/class3.crt | |
hash_2=a141608eb73a065b6aa4595bd23572621e359332bb99f8cb79aafaeb82e076b4f4c697e80fbc80a8c7e456520a7bba21a637e1523229340989905c3072b1cda5 | |
nb=2 |
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
root@camille:/etc/pve# lvcreate -L 16M -n vm-119-disk-1 vms | |
device-mapper: create ioctl on vms-vm--119--disk--1 failed: Device or resource busy | |
Failed to activate new LV. | |
root@camille:/etc/pve# | |
==> http://setaoffice.com/2015/03/25/device-mapper-create-ioctl-failed-device-or-resource-busy/ | |
root@camille:/etc/pve# | |
root@camille:/etc/pve# dmsetup | |
Usage: |