Skip to content

Instantly share code, notes, and snippets.

View StefanFabian's full-sized avatar

Stefan Fabian StefanFabian

View GitHub Profile
@StefanFabian
StefanFabian / .anaconda_with_ros_wrapper.bash
Last active March 7, 2023 16:49
Bash script to use Anaconda with ROS
### This script wraps all executables in the anaconda bin folder so that they can be used without adding Anaconda
### to the path which would break some functionality of ROS (Robot Operating System)
###
### The commands e.g. jupyter notebook will cause the script to add anaconda to the path, start jupyter notebook
### and after jupyter notebook terminated remove anaconda from the path again
###
### Notable commands:
### * release-the-snake Adds conda to the path and removes all aliases defined by this script
### Conda will stay in the PATH until the end of the session (terminal is closed) or
### until "cage-the-snake" is called
@StefanFabian
StefanFabian / multienv_setup.sh
Last active February 9, 2023 14:52
MultiEnv: A small bash tool to handle multiple (possibly) clashing bash environments, e.g., different ROS workspaces
#!/bin/bash
# ___ ___ _ _ _ _____ _ ____ __ _ __ __
# | \/ | | | | | | | |_ _| | | | __| | \ | | \ \ / /
# | |\ /| | | |_| | | |__ | | | | | |__ | \ | | \ \ / /
# |_| \/ |_| |_____| |____| |_| |_| | __| | |\ \| | \ \/ /
# | |__ | | \ | \ /
# v1.0 by Stefan Fabian |____| |_| \__| \/
#
# This script installs multienv, a small bash tool that allows you to easily switch between environments.
# For available commands run 'multienv help' after installation.
@StefanFabian
StefanFabian / History|-3daa5698|entries.json
Last active June 3, 2022 19:42
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///media/stefan/Data/sim/paper/rviz_overlay/examples/remote_control.qml","entries":[{"id":"HmAq.qml","source":"undoRedo.source","timestamp":1654284680052}]}
@StefanFabian
StefanFabian / cloudSettings
Last active November 12, 2020 09:46
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-11-12T09:46:17.765Z","extensionVersion":"v3.4.3"}
@StefanFabian
StefanFabian / CPP Code.cpp
Last active April 26, 2019 13:01
doT C++ Code file template for the VSCode extension File Template Manager
{{
let date = new Date($.DATE);
let date_string = date.getDate().toString().padStart(2, '0') + '.' + (date.getMonth() + 1).toString().padStart(2, '0') + '.' + date.getFullYear();
let paths = $.DIR.split('/');
let index = paths.lastIndexOf('src');
let has_ns = index > 0 && index < paths.length;
let ns = "";
if (has_ns) {
ns = paths[index - 1];
}
@StefanFabian
StefanFabian / CPP Header.h
Last active April 26, 2019 12:56
doT C++ Header file template for the VSCode extension File Template Manager
{{
let date = new Date($.DATE);
let date_string = date.getDate().toString().padStart(2, '0') + '.' + (date.getMonth() + 1).toString().padStart(2, '0') + '.' + date.getFullYear();
let paths = $.DIR.split('/');
let index = paths.lastIndexOf('include');
let has_ns = index >= 0 && index < paths.length;
let ns = "";
let include_guard = $.NAME.toUpperCase() + '_H';
if (has_ns) {
ns = paths[index + 1];