Skip to content

Instantly share code, notes, and snippets.

View r0oland's full-sized avatar
🎯
Focusing

Johannes Rebling r0oland

🎯
Focusing
View GitHub Profile
@r0oland
r0oland / .clang-format
Last active July 28, 2025 05:28
Default Python Packages... [Archived]
---
BasedOnStyle: LLVM
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: 'true'
AlignConsecutiveAssignments: 'true'
AlignOperands: 'false'
AllowAllArgumentsOnNextLine: 'false'
AllowShortBlocksOnASingleLine: 'false'
DerivePointerAlignment: 'false'
@r0oland
r0oland / powershell.ps1
Created October 7, 2022 17:26
Practical ANSI Color Codes
# simple effects
$BOLD = "`e[1m"
$UNDERLINED = "`e[4m"
# simple colors
$RED = "`e[31m"
$GREEN = "`e[32m"
# RGB colors
$METER_BLUE = "`e[38;2;34;98;147m" # 0x22 0x62 0x93 == 34 98 147
@r0oland
r0oland / conda.ps1
Last active July 2, 2024 11:20
Useful Python snippets
# create new empty env
conda create --name myenv
# export currently activated env to environment.yml without prefixes etc
conda env export --from-history | findstr -v "prefix" > environment.yml
# install environment based on such a environment.yml
conda env create -f environment.yml
# or even better, using Mamba
@r0oland
r0oland / first_cell.py
Last active July 28, 2025 05:29
Python Plotting
%reload_ext autoreload
%autoreload 2
@r0oland
r0oland / first_cell.py
Created October 30, 2023 07:52
Auto Reload Python Files in Jupyter
%reload_ext autoreload
%autoreload 2
@r0oland
r0oland / header_template.h
Last active November 22, 2024 11:58
C Templates and Usefull Stuff
/**
* @author Johannes Rebling ([email protected])
* @brief
* @date
*
* @copyright ASMPT GmbH & Co. KG, SMT R&D 34 - 2024
*
*/
#ifndef _XXX_H
@r0oland
r0oland / regex_replace_c_comments.txt
Last active April 9, 2024 12:55
Regex | Search and Replace
serach: /\*(.*?)\*/
replace: //$1
@r0oland
r0oland / readme.md
Last active January 11, 2026 19:34
Conda

Conda Cheat Sheet

  • fix issues with powershell and conda 24.x

    • conda install -n base -c defaults conda=25.*
  • Create a new environment:

    • conda create --name myenv python=3.8
@r0oland
r0oland / git.ps1
Last active February 13, 2025 11:57
GIT Usefull
# pretty output on command line
git log --since='1 month ago' --format='%Cgreen%ci%Creset %s%Creset' --no-merges
# more details
git log --since='1 month ago' --format='%Cgreen%ci%Creset %s%Creset' --no-merges --shortstat
# even more details
git log --since='1 month ago' --format='%Cgreen%ci%Creset %s%Creset' --no-merges --stat
# output to summary file
@r0oland
r0oland / linux.md
Last active February 28, 2025 19:19
SSH / Linux / HA Notes and tricks

ssh-keygen -t rsa -b 4096 -f $env:USERPROFILE\.ssh\id_rsa -C "[email protected]"

type $env:USERPROFILE\.ssh\id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"