This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"telemetry.enableTelemetry": false, | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.acceptSuggestionOnEnter": "on", | |
"diffEditor.ignoreTrimWhitespace": false, | |
"window.zoomLevel": 0, | |
"remote.SSH.defaultExtensions": [ | |
"C/C++" | |
], | |
"debug.onTaskErrors": "abort", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set DISPLAY=%RANDOM% | |
cd C:\PROGRA~1\VcXsrv | |
start "" C:\PROGRA~1\VcXsrv\vcxsrv :%DISPLAY% | |
wsl.exe -d Ubuntu export DISPLAY=:%DISPLAY%.0; lxsession; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if [[ $# -ne 2 ]]; then | |
echo pdf2qdf2pdf in.pdf out.pdf; | |
exit 1; | |
fi; | |
qpdf -qdf $1 ${1/.pdf/.qdf}; | |
FIX="/Catalog \n | |
/PageLabels << \n | |
/Nums [ \n | |
0 << /S /r >> \n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# https://askubuntu.com/questions/73474/how-to-install-firefox-addon-from-command-line-in-scripts | |
if [[ -f $0 ]]; then | |
scriptname=$(basename $(readlink -f $0)) | |
else | |
scriptname="firefox_install_addons.sh" | |
fi | |
usage() { cat << EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# https://askubuntu.com/questions/73474/how-to-install-firefox-addon-from-command-line-in-scripts | |
scriptname=$(basename $(readlink -f $0)) | |
usage() { cat << EOF | |
usage: $scriptname url | |
Installe en local l'addon .xpi dispo à l'adresse url | |
exemples: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage () { cat << EOF | |
usage : pdfcompress [ -q id ] file.pdf | |
options : -q id | |
0 screen (screen-view-only quality, 72 dpi images) | |
1 default (almost identical to /screen) | |
2 ebook (low quality, 150 dpi images) | |
3 printer (high quality, 300 dpi images) | |
4 prepress (high quality, color preserving, 300 dpi imgs) |
NewerOlder