Skip to content

Instantly share code, notes, and snippets.

View davlgd's full-sized avatar

David Legrand davlgd

View GitHub Profile
@davlgd
davlgd / nvmeTarget.sh
Last active November 2, 2021 17:04
NVMe/TCP Target Creator
#!/bin/bash
# On affiche les informations sur les modules NVMe
clear
echo
echo "Module NVME_TARGET de votre noyau :"
echo "==================================="
echo
cat /boot/config-`uname -r` | grep NVME_TARGET
@davlgd
davlgd / 1_minio.sh
Last active October 14, 2020 03:01
Minio distributed setup
#!/bin/bash
apt update && apt full-upgrade -y && apt autoremove -y
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mv minio /usr/local/bin
useradd -r minio -s /sbin/nologin
chown minio:minio /usr/local/bin/minio
@davlgd
davlgd / WinGetMulti.ps1
Last active September 25, 2023 16:50
PowerShell scripts to make WinGet great again
<# Script to install multiple applications in one command line through WinGet
You can modify bootstrapArray value and use "--bootstrap" argument to bootstrap a new machine
Don't forget to change ExecutionPolicy to execute this script
Set-ExecutionPolicy -ExecutionPolicy AllSigned -Scope CurrentUser #>
$bootstrapArray = @("vlc", "7zip", "cpu-z", "coretemp")
if ((New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
if ($args[0] -ne "--bootstrap") { $bootstrapArray = $args }
@davlgd
davlgd / sd_bench.fio
Created March 10, 2020 09:38
Raspberry Pi SD Card Speed Test files
# Use FIO to emulate the Apps Class A1 performance test.
# This isn't an exact benchmark as the card isn't in the state required by the
# specification, but is good enough as a sniff test.
#
[global]
ioengine=libaio
iodepth=4
size=64m
direct=1
end_fsync=1
@davlgd
davlgd / pi_soc_monitor.py
Created July 30, 2019 07:02
Raspberry Pi SoC monitoring script
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import csv
import time
delay = 2
csv_file = "pi_soc_results.csv"
@davlgd
davlgd / apps-init.cmd
Last active May 7, 2019 10:31
Apps init (via Chocolatey)
@ECHO OFF
TITLE Application initializer v0.1
COLOR 0A
ECHO ### Installation de Chocolatey ###
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
refreshenv
@davlgd
davlgd / Autounattend.xml
Last active April 14, 2024 12:15
Fichier d'automatisation de l'installation de Windows 10 Pro
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>fr-FR</UILanguage>
</SetupUILanguage>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
@davlgd
davlgd / default
Last active April 1, 2022 01:20
Menu PXE Linux
DEFAULT menu.c32
MENU TITLE Serveur d'installation PXE
TIMEOUT 300
LABEL debian
MENU LABEL ^Debian 9.9 (Netboot)
LINUX memdisk
INITRD _iso/debian_9.9_netboot.iso
LABEL fedora30
@davlgd
davlgd / auto.preseed
Last active July 8, 2022 10:29
Ubuntu Desktop 19.04 Preseed File
### Fichier de préconfiguration pour l'installation d'Ubuntu Desktop 19.04 (Disco Dingo)
### Intègre les éléments liés à Ubiquity mais principalement basé sur Debian Installer
### Template complet : https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Guide officiel : https://help.ubuntu.com/lts/installation-guide/s390x/apbs04.html
##########################################################
### Paramètres Ubiquity uniquement pour Ubuntu Desktop ###
##########################################################
### Reprise du contenu d'Ubuntu.seed
@davlgd
davlgd / preseed.cfg
Last active April 30, 2019 12:54
Preseed file for Debian 9.x (French)
### Fichier de préconfiguration pour l'installation de Debian 9.x (Stretch)
### Template complet : https://www.debian.org/releases/stable/example-preseed.txt
### Guide officiel : https://www.debian.org/releases/stable/i386/apbs04.html.fr
### Configuration du français comme langue d'installation
d-i debian-installer/locale string fr_FR
### Décommenter pour configurer chaque élément de manière distincte
### Peut être utile pour des combinaisons spécifiques
#d-i debian-installer/locale string fr_FR.UTF-8