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 / OUTPUT.png
Last active November 20, 2022 18:44
RGB to xterm/oklch
OUTPUT.png
@lboulard
lboulard / kelbt-0.16.tar.gz
Last active October 16, 2022 09:01
Build Ragel 6.10 on windows with MSYS2/MINGW64
@lboulard
lboulard / README.md
Last active December 7, 2023 19:13
Fancy clink #windows #dotfiles
@lboulard
lboulard / no_sleep_display.py
Last active December 7, 2023 19:12
Prevent windows from powering off screen #windows
#!/usr/bin/env python3
import ctypes
import signal
import threading
if __name__ == "__main__":
SetThreadExecutionState = ctypes.windll.kernel32.SetThreadExecutionState
SetThreadExecutionState.argtypes = [ctypes.c_uint32]
@lboulard
lboulard / Git-as-carrier.md
Last active March 24, 2022 11:54
Git as carrier

Git as carrier

Using a Git tag

Create a tag tar with file-others content to save.

$ git tag tar "$(tar cf - $(git ls-files -o --exclude-standard) | git hash-object -t blob -w --stdin --no-filters)"
@lboulard
lboulard / .gitignore
Last active December 7, 2023 19:19
[Pushover] Pushover notification in ruby program #ruby #notification
*~
*.bak
*.orig
*.sw[a-z]
\#*\#
vendor
@lboulard
lboulard / mkpass.bat
Last active September 27, 2022 20:33
Generate good enough password
0<0# : ^
"""
:: Keep a python script inside a bat file
:: Source https://stackoverflow.com/a/41651933
@py -3 -x -B "%~f0" %*
@EXIT /B
:: former shell version with only uniform distribution
@busybox sh -c "A=`dd if=/dev/urandom | tr -cd a-hjkmnp-zA-HJKMNP-Z2-46-9 | head -c 18`; echo ${A:0:6}-${A:6:6}-${A:12:6}"
"""
@lboulard
lboulard / typescript-cleanup.sh
Created November 23, 2021 12:35
Cleanup typescript generated using script command
#!/bin/sed -rf
# Requires GNU sed
#
# Based on this response: https://stackoverflow.com/a/28269556
# ANSI Sequences: https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797
# Remove BEL and BACKSPACE from command line inputs
:again
s/\x07+//g
s/[^\x08]\x08(\x1b\[K)?//
@lboulard
lboulard / README.md
Created October 8, 2021 13:15
Add message to getty login screen on framebuffer

Add message to getty login screen on framebuffer

"man getty" to see option in file

sudo install -m 0755 /etc/issue.d
cat <<EOF | sudo tee /etc/issue.d/details.issue
\n.\o (\s \m \r) \t [\4]

EOF
@lboulard
lboulard / clang-format.aosp.txt
Created September 27, 2021 12:51
clang-format AOSP style
BasedOnStyle: Google
Standard: Cpp11
AccessModifierOffset: -2
AllowShortFunctionsOnASingleLine: Inline
ColumnLimit: 100
CommentPragmas: NOLINT:.*
DerivePointerAlignment: false
IncludeBlocks: Preserve
IndentWidth: 4
ContinuationIndentWidth: 8