Skip to content

Instantly share code, notes, and snippets.

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

Ludovic Rivallain lrivallain

🏠
Working from home
View GitHub Profile
@lrivallain
lrivallain / README.md
Last active December 20, 2023 13:27
ESU with Arc checks for 2012 servers

ESU with Arc checks for 2012 servers

A set of test to ensure pre-requisites for enabling ESU with Arc checks for 2012 servers.

Download

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://gist.github.com/lrivallain/17eb19c95ff66f44713de03b7c93c6f2/raw/arc-esu-check.ps1 -OutFile arc-esu-check.ps1
@lrivallain
lrivallain / README.md
Last active November 26, 2021 13:28
Quickstart WSL2+Ubuntu
  1. Activate WSL and VM features:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Reboot
  2. Download installer: Paquet d’installation pour les systèmes x64
  3. Define WSL default version
wsl --set-default-version 2
@lrivallain
lrivallain / .tmux.conf
Last active November 18, 2021 10:26
Tmux configuration file
###########
# general #
###########
# Prefix: CTRL+b
set-option -g prefix C-b
# 2nd prefix: CTRL+space
set-option -g prefix2 C-Space
set-window-option -g mode-keys vi
@lrivallain
lrivallain / .p10k.zsh
Created November 18, 2021 10:06
Powerlevel10k configure file
# Generated by Powerlevel10k configuration wizard on 2021-11-03 at 14:15 CET.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 19497.
# Wizard options: awesome-fontconfig, small icons, rainbow, unicode, flat heads,
# flat tails, 2 lines, disconnected, no frame, sparse, many icons, concise,
# transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
#
@lrivallain
lrivallain / .zshrc
Created November 18, 2021 10:02
ZSH configuration file
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@lrivallain
lrivallain / LRI_custom_keyboard_FROSS.klc
Created November 18, 2021 09:11
Windows Custom Keyboard FR OSS
KBD OSS_LRI "FR - custom, based on OSS"
COPYRIGHT "(c) 2019 lri.ovh"
COMPANY "lri.ovh"
LOCALENAME "fr-FR"
LOCALEID "0000040c"
@lrivallain
lrivallain / howto.sh
Last active August 23, 2021 13:31
Python venvs with default packages installed
python ./venv.py myvenv
. myvenv/bin/activate
@lrivallain
lrivallain / pika-1254.patch
Created November 26, 2020 08:38
This patch is a part of a Pika project pull request (https://github.com/pika/pika/pull/1254) to fix RecursionError on Python 3.8
This patch is a part of a Pika project pull request (https://github.com/pika/pika/pull/1254)
to fix RecursionError on Python 3.8
If your python verion is 3.8.x, you can apply it with the following command:
`patch -p0 < pika-1254.patch`
--- /usr/local/lib/python3.8/dist-packages/pika/compat.py 2020-11-26 08:19:42.917005001 +0000
+++ compat.py_1254 2020-11-26 08:21:38.717001959 +0000
@@ -95,6 +95,9 @@
serialized as `l` instead of `I`
@lrivallain
lrivallain / Fix_RDP_CredSSP_encryption_issue.bat
Created July 20, 2020 08:39
This command provide a way to workarround the "CredSSP encryption oracle remediation" error when you try to RDP to a Windows VM
:: This command provide a way to workarround the "CredSSP encryption oracle remediation" error when
:: you try to RDP to a Windows VM
:: More details: https://support.microsoft.com/en-us/help/4295591/credssp-encryption-oracle-remediation-error-when-to-rdp-to-azure-vm
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters\ /v AllowEncryptionOracle /t REG_DWORD /d 2 /f
@lrivallain
lrivallain / create_certs_requests.sh
Created July 9, 2020 15:29
This script will produce SSL certificate signing request with subjectAltName covering several alternatives hostnames.
#!/bin/bash
#==============================================================================
#title : create_certs_requests.sh
#description : This script will produce SSL certificate signing request with subjectAltName covering several alternatives hostnames.
#author : lrivallain
#date : 20200101
#version : 1.0
#usage : bash create_certs_requests.sh PRIMARY_FQDN [SECONDARY_DNS] [...]
#notes : requires: openssl
#==============================================================================