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 / .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
@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 / config-viz.py
Last active August 26, 2025 22:37
Configuration for the visual style of my educational plots in Python
from cycler import cycler
import matplotlib as mpl
import matplotlib.pyplot as plt
# Okabe-Ito color palette
okabe_ito = [
"#000000", "#E69F00", "#56B4E9", "#009E73",
"#F0E442", "#0072B2", "#D55E00", "#CC79A7"
]
@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