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 / init_env
Created July 11, 2019 12:19 — forked from derkling/init_env
A set of repo related functions to speedup AOSP related development
# Export repo path
export PATH=/mnt/data/src/aosp:$PATH
export REPO_MIRROR=isilon.cambridge.arm.com:/ifs/arm/scratch/aosp_mirror
export REPO_MOUNT=/mnt/data/src/aosp_mirror
# Mount AOSP Cambridge mirror (if required)
function repo_mount {
mount | grep "$REPO_MOUNT" &>/dev/null
[[ $? -eq 1 ]] || return
@lboulard
lboulard / .gitattributes
Last active February 16, 2025 12:46
Silent install of multiple python versions #windows #pythin #silent #installation
*.bat eol=crlf
*.xml eol=crlf
@lboulard
lboulard / py-script-inside.bat
Last active April 11, 2020 12:46
Python script inside dosbatch file
0<0# : ^
'''
:: Keep a python script inside a bat file
:: Source https://stackoverflow.com/a/41651933
@SETLOCAL ENABLEEXTENSIONS
@py -3 -x -B "%~f0" %*
@SET ERR=%ERRORLEVEL%
@:: Pause if not interactive
@ECHO %cmdcmdline% | FIND /i "%~0" >NUL
@IF NOT ERRORLEVEL 1 PAUSE
@lboulard
lboulard / getsha256.cmd
Last active December 7, 2023 19:10
Quick get SHA1 and SHA256 from remote file URL #python
0<0# : ^
"""
:: Keep a python script inside a bat file
:: Source https://stackoverflow.com/a/41651933
@py -3 -x -B "%~f0" %*
@EXIT /B
"""
import sys
from os.path import basename
from urllib.parse import urlparse
@lboulard
lboulard / Native window IntelliJ.md
Created May 13, 2020 10:52
Native window IntelliJ
@lboulard
lboulard / run-as-busybox.bat
Created June 2, 2020 09:33
Run ash/busybox shell script inside dos batch file
:<<"::EOF"
@busybox sh "%~f0"
@EXIT /B
::EOF
set -x
echo "$SHELL"
echo "running in busybox"
exit $?
@lboulard
lboulard / export.bat
Last active May 5, 2022 08:22
Scoop setup/daily scripts
@SETLOCAL
@CD "%~dp0"
:: WARNING scoop force exit of batch
powershell -C "%~dp0\export.ps1"
@IF "x%~1"=="xbatch" GOTO :EOF
@:: Pause if not interactive
@ECHO %cmdcmdline% | FIND /i "%~0" >NUL
@IF NOT ERRORLEVEL 1 PAUSE
@lboulard
lboulard / untargz.bat
Created September 10, 2020 14:24
untargz on windows using 7Zip command line
@SETLOCAL
@IF "%1" == "" @(
ECHO missing filename as argument
EXIT /B 1
)
@IF "%2" == "" (SET "OUTPUT=-o"%~dpn1"") ELSE (SET "OUTPUT=-o"%~2"")
7z x "%1" -so | 7z x -aoa -si -ttar %OUTPUT%
@lboulard
lboulard / pipx-jupyter.md
Last active March 13, 2024 18:19
pipx and Jupyter Qt console

pipx version

pipx --version
0.16.3

First installation

pipx install --include-deps jupyterlab
pipx inject jupyterlab matplotlib numpy jupyter-console scipy simpy sympy

pipx inject jupyterlab arrow pandas tabulate isort black jupyterlab_code_formatter

@lboulard
lboulard / p.cmd
Created December 14, 2020 09:47
p command to manage path in cmd.exe
@ECHO OFF
VERIFY OTHER 2>nul
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
IF ERRORLEVEL 1 ECHO *** Unable to enable extensions
SET P=%PATH%
IF "%1"=="" GOTO :list
IF "%1"=="list" GOTO :list