Skip to content

Instantly share code, notes, and snippets.

View pirpyn's full-sized avatar
⏲️
Getting older...

Pierre Payen pirpyn

⏲️
Getting older...
View GitHub Profile
@pirpyn
pirpyn / mount_usb.sh
Created February 24, 2020 13:43
Automatic USB drive mounting in WSL
#!/bin/bash -e
# Small script to automatically mount/unmount USB drive in WSL
usage() {
cat << EOF
usage: $(basename $0) [-h] [-l] [-u|-m]
Options:
-h
Show this message
@pirpyn
pirpyn / settings.json
Created September 15, 2020 16:07
User VSCode settings
{
"telemetry.enableTelemetry": false,
"workbench.startupEditor": "newUntitledFile",
"editor.acceptSuggestionOnEnter": "on",
"diffEditor.ignoreTrimWhitespace": false,
"window.zoomLevel": 0,
"remote.SSH.defaultExtensions": [
"C/C++"
],
"debug.onTaskErrors": "abort",
#!/usr/bin/env python3
def display_graph(graph):
"""
Display the graph as an adjacency matrix
"""
for row in graph:
print(row)
def create_graph(entrances,exits,path):
#!/bin/bash
trap_sigint(){
cat << EOF
Conversion interrupted. What do you want to do ?
s) stop
p) show/hide progress
EOF
read -n 1 reply
case $reply in
s) exit;;
@pirpyn
pirpyn / elden_ring_coop_install.bat
Last active May 8, 2023 18:10
Install the Elden Ring Coop mod by saving this script (download zip) and execute it
@echo off
setlocal
for /f "usebackq tokens=1,2,*" %%B IN (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) do set DESKTOP=%%D
for /f %%i in ('echo %DESKTOP%') do set DESKTOP=%%i
if NOT EXIST "%DESKTOP%/" (
echo error: Desktop not found
goto :END
)