Skip to content

Instantly share code, notes, and snippets.

View lboulard's full-sized avatar
💭
Be patient. I enjoy real world.

Laurent Boulard lboulard

💭
Be patient. I enjoy real world.
  • Versailles, France
View GitHub Profile
@lboulard
lboulard / showlic.bat
Created August 31, 2018 09:15
Display Windows 10 license details
slmgr.vbs /dlv
@lboulard
lboulard / go.mod
Last active October 11, 2018 13:56
Parse YAML dual type field
module lboulard.net/go/playfield/flexible-yaml
require gopkg.in/yaml.v2 v2.2.1
@lboulard
lboulard / python_executables.bat
Last active February 3, 2022 13:30
Get Python executable paths
@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
@SET "HKEY=HKEY_LOCAL_MACHINE\Software\Python\PythonCore"
@ECHO.::::::::: Local Machine
@CALL :display "HKEY_LOCAL_MACHINE\Software\Python\PythonCore"
@ECHO.::::::::: Current User
@CALL :display "HKEY_CURRENT_USER\Software\Python\PythonCore"
@FOR /F "usebackq" %%v in (`py.exe -c "import sys;print(sys.winver)"`) DO @SET "VERSION=%%v"
@ECHO.::::::::: py.exe current version
@ECHO Current version: Python %VERSION%
@GOTO :EOF
@lboulard
lboulard / community_install_offline.bat
Created December 21, 2018 21:24
Save/restore VS2017 installation packages
@CD "%~dp0\vs2017offline"
.\vs_community.exe --noweb --locale en-US --addProductLang en-US ^
--passive --norestart ^
--config "%~dp0\community.vsconfig.json"
@lboulard
lboulard / zeroes.sh
Last active January 20, 2019 08:55
Zeroed free space of vfat filesystem
#!/bin/sh
set -eu
usage() {
printf "usage: %s <filesystem>\n\n" "$(basename "$0")"
}
if [ $# != 1 ]; then usage >&2; exit 1; fi
fs="${1%/}"
@lboulard
lboulard / xkb.md
Last active December 6, 2024 18:34
XKB settings for US keyboard
From 65752efbecf15f8a24ee83126115fd578d2f86e9 Mon Sep 17 00:00:00 2001
From: Wez Furlong <[email protected]>
Date: Mon, 8 Jan 2018 21:57:43 -0800
Subject: [PATCH 1/2] fix art.t test failure on alpine linux
Summary:
Looks like we end up with root_ holding a nullptr after
the associated test is finished. This only seems to be a problem
in practice on Alpine linux's musl libc based environment, and
only when built with `-O2`. Not sure if this is a c++ standard
@lboulard
lboulard / install-vim.sh
Last active January 24, 2024 05:06
Compile Vim 8 on Centos 7
# Source: https://www.netroby.com/view/3891
yum groupinstall "Development Tools"
yum install ncurses-devel git-core
git clone [email protected]:vim/vim.git
./configure --prefix=/usr --with-features=huge --enable-multibyte --with-python-config-dir=/usr/lib/python2.7/config --enable-pythoninterp=yes
make -j4
make install
@lboulard
lboulard / pip-upgrade-all-windows.md
Last active February 2, 2020 10:47
Manage python packages on windows

Upgrade all

Upgrade pip before in case of very old version on system:

py -3 -m pip install --user -U pip

Upgrade all root packages in one go (avoid generating broken dependencies between root projects):

DEL "%TMP%\pip-upgrade.txt"
FOR /F "delims==" %i IN ('py -3 -m pip list --user --not-required --format=freeze') DO @ECHO %i &gt;&gt;"%TMP%\pip-upgrade.txt"
@lboulard
lboulard / 99-lboulard.rules
Created June 21, 2019 14:30
udev rules for changing external SSD to noop io scheduler
# vim /etc/udev/rules.d/99-lboulard.rules
ACTION!="add|change", GOTO="lboulard_end"
SUBSYSTEM!="block", GOTO="lboulard_end"
ENV{ID_VENDOR}!="JMicron", GOTO="lboulard_end"
ENV{ID_MODEL_ID}!="0562", GOTO="lboulard_end"
ATTR{queue/scheduler}="none"
LABEL="lboulard_end"
# udevadm control --reload