Skip to content

Instantly share code, notes, and snippets.

View masterdesky's full-sized avatar
🦝
<- This is a raccoon, yes

masterdesky masterdesky

🦝
<- This is a raccoon, yes
View GitHub Profile
@masterdesky
masterdesky / debug.sh
Last active February 2, 2026 14:07
Minimal VSCode debug configuration
python -m debugpy --wait-for-client --listen 0.0.0.0:5678 -m <module.file> <arguments>
@masterdesky
masterdesky / settings.json
Created December 1, 2025 11:51
LaTeX workshop settings for VSCode with biber and bibtex support
"latex-workshop.latex.tools": [
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
@masterdesky
masterdesky / torwget.sh
Created May 17, 2025 14:45
Route wget traffic through Tor using torsocks
#!/usr/bin/env bash
# Route wget traffic through Tor using torsocks
# Usage: ./torwget.sh [wget-options] URL
if [ $# -ge 1 ]; then
>&2 echo "Usage: $0 [wget-options] URL"
exit 1
fi
if ! command -v torsocks &> /dev/null; then
@masterdesky
masterdesky / matplotlib-config.py
Last active March 29, 2026 14:41
Configuration for the visual style of my educational plots in Python
from cycler import cycler
import matplotlib.pyplot as plt
okabe_ito = [
'#000000', '#E69F00', '#56B4E9', '#009E73',
'#F0E442', '#0072B2', '#D55E00', '#CC79A7',
]
custom_settings: dict = {
'axes.prop_cycle': cycler(color=okabe_ito),
@masterdesky
masterdesky / github.bat
Last active October 13, 2021 17:31
CD to GitHub directory or create one if it isn't exists on Windows
@echo off
set /p github-dir=%GITHUB_DIR_LOCATION%
if not exist %github-dir% (
echo "GitHub folder is missing! Creating..."
mkdir "%github-dir%" 2>nul
)
cd "%github-dir%"
echo "Changed to GitHub directory"
@masterdesky
masterdesky / .zshrc
Last active March 21, 2021 15:27
Source enviromental config of Geant4 from Z shell
# Geant4 doesn't support zsh/ksh/etc. non-bash shells to source
# its enviromental configuration script in the "normal" bash-like way.
# Instead we have to change to Geant4's bin diretory and source the
# appropriate `geant4.sh` script from there.
# Suppose we installed Geant4 under the `${GEANT4_INSTALL}` directory
if [ -f ${GEANT4_INSTALL}/bin/geant4.sh ];
then
cd ${GEANT4_INSTALL}/bin
source geant4.sh