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
Vagrant.configure("2") do |config| | |
# https://www.vagrantup.com/docs/other/environmental-variables.html#vagrant_checkpoint_disable | |
# rundll32 sysdm.cpl,EditEnvironmentVariables | |
# set CHECKPOINT_DISABLE=1 | |
#config.vm.box_check_update = false | |
config.vm.box = "centos/7" | |
config.vm.provider "virtualbox" do |vb| | |
#vb.cpus = 2 | |
vb.memory = "768" | |
vb.default_nic_type = "virtio" |
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
[ | |
{ | |
"key": "ctrl+alt+right", | |
"command": "-workbench.action.moveEditorToNextGroup" | |
}, | |
{ | |
"key": "ctrl+alt+right", | |
"command": "multiCommand.moveLineRightGroup" | |
} | |
] |
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
rename_node() { | |
RABBITMQ_NODENAME=$1 rabbitmqctl rename_cluster_node $1 $2 && ( | |
mv /var/lib/rabbitmq/mnesia/$1 /var/lib/rabbitmq/mnesia/$2 | |
mv /var/lib/rabbitmq/mnesia/$1-plugins-expand /var/lib/rabbitmq/mnesia/$2-plugins-expand | |
mv /var/lib/rabbitmq/mnesia/$1-rename /var/lib/rabbitmq/mnesia/$2-rename | |
mv /var/lib/rabbitmq/mnesia/$1.pid /var/lib/rabbitmq/mnesia/$2.pid | |
) | |
} | |
rename_node old@node new@localhost |
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
https://docs.python.org/3/reference/index.html | |
https://docs.python.org/3/library/index.html | |
https://www.cs.put.poznan.pl/csobaniec/software/python/py-qrc.html | |
https://perso.limsi.fr/pointal/python:abrege | |
https://perso.limsi.fr/pointal/python:memento | |
https://perso.limsi.fr/pointal/_media/python:cours:abregepython.pdf | |
https://perso.limsi.fr/pointal/_media/python:cours:abregepython-english.pdf | |
https://perso.limsi.fr/pointal/_media/python:cours:mementopython3.pdf |
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 python | |
# -*- coding: utf-8 -*- | |
import sys | |
import argparse | |
from collections import OrderedDict | |
import configparser | |
import pathlib | |
import json | |
import requests |
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
$ErrorActionPreference = "Stop" | |
# https://blogs.technet.microsoft.com/heyscriptingguy/2013/12/10/use-powershell-to-create-registry-keys/ | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-itemproperty | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-item | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-item | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-itempropertyvalue | |
# https://docs.microsoft.com/en-us/windows/desktop/shell/fa-verbs | |
# https://docs.microsoft.com/en-us/windows/desktop/shell/handlers | |
# https://docs.microsoft.com/en-us/windows/desktop/shell/fa-sample-scenarios |
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
https://unix.stackexchange.com/questions/457670/netcat-how-to-listen-on-a-tcp-port-using-ipv6-address | |
https://github.com/craSH/socat/blob/master/EXAMPLES | |
https://serverfault.com/questions/353985/socat-show-incoming-connections | |
socat -d -d -6 tcp6-listen:5555 stdio | |
socat -d -d -6 tcp-connect:[ipv6]:88 stdio | |
https://stackoverflow.com/questions/5106674/error-address-already-in-use-while-binding-socket-with-address-but-the-port-num | |
http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-2.html#time_wait | |
netstat -Waptun |grep 5555 | |
ss -aptun | grep 5555 |
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
[Unit] | |
Description=OVH Dynhost updater daemon | |
After=network-online.target | |
Wants=network-online.target | |
[Service] | |
ExecStart=/opt/ovh_dynhost.py --journald /etc/opt/ovh_dynhost.ini | |
Restart=on-abort | |
[Install] |
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
# https://imapclient.readthedocs.io/en/2.1.0/ | |
# https://imapclient.readthedocs.io/en/2.1.0/api.html#module-imapclient.testable_imapclient | |
# py -m pip install imapclient | |
import imapclient | |
server = imapclient.IMAPClient('outlook.office365.com') | |
server.login('user', 'pass) | |
server.select_folder('Deleted') | |
messages = server.search() | |
total_move = len(messages) |
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
# Display the PDF when possible, instead of downloading it | |
<FilesMatch "My Name - CV (?<CV_LANG>[A-Z]{2})\.pdf"> | |
# https://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http | |
# https://tools.ietf.org/html/rfc5987 | |
Header set "Content-disposition" "inline; filename=\"My Name - CV %{MATCH_CV_LANG}e.pdf\"; filename*=UTF-8''My%%20Name%%20-%%20CV%%20%{MATCH_CV_LANG}e.pdf" | |
</FilesMatch> | |
# Finally, default to FR | |
SetEnvIf HOST "^resume\." CV_LANG=EN | |
SetEnvIf CV_LANG ^$ CV_LANG=FR |