Skip to content

Instantly share code, notes, and snippets.

View harderthan's full-sized avatar
🕴️
I

nicky harderthan

🕴️
I
View GitHub Profile
@harderthan
harderthan / gist:ae37356501c65b0eb7f880ab58f8acf1
Created October 8, 2019 05:00
Xorg.conf file for TurboVNC
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 390.116 (buildmeister@swio-display-x64-rhel04-14) Sun Jan 27 07:47:55 PST 2019
Section "DRI"
Mode 0666
EndSection
#Section "ServerLayout"
# Identifier "Layout0"
# Screen 0 "Screen0"
@harderthan
harderthan / link_tutorial.xacro
Last active September 19, 2022 14:12
URDF Link Tutorial
@harderthan
harderthan / configure_file.CMakeLists.txt
Last active April 16, 2025 13:31
cmake configure_file() example
cmake_minimum_required(VERSION 3.16.3)
project(configure-file-example)
# Configure file, export the environment variable.
set(FOO_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/${PATH_YOU_WANT}")
configure_file(config/foo.h.in foo.h @ONLY)
# Libraries or excutables
# ...
@harderthan
harderthan / sync_to_remote.sh
Last active January 7, 2026 04:42
sync to remote with rsync
#!/usr/bin/env bash
set -euo pipefail
REMOTE_HOST=""
REMOTE_DIR=""
SSH_PORT=22
rsync -azL --delete \
-e "ssh -p ${SSH_PORT}" \
--exclude ".git" \
@harderthan
harderthan / watch_sync.sh
Created January 7, 2026 04:43
watch sync with rync
#!/usr/bin/env bash
set -euo pipefail
DEBOUNCE_SEC="${DEBOUNCE_SEC:-0.2}"
SYNC_CMD="./sync_to_remote.sh" # https://gist.github.com/harderthan/d56aaf41bd7836fae011d74d55b46d4b
EXCLUDE_REGEX='(^|/)(\.git|__pycache__|\.venv|build|\.cache)(/|$)|(\.pyc$)'
sync_running=0
sync_pending=0