Skip to content

Instantly share code, notes, and snippets.

View harderthan's full-sized avatar
🕴️
I

nicky harderthan

🕴️
I
View GitHub Profile
@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
@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 / 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 / link_tutorial.xacro
Last active September 19, 2022 14:12
URDF Link Tutorial
@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 / README.md
Created February 14, 2019 03:59
ROS Python Tutorial for Beginners
#include <opencv2/core/core.hpp>
#include <pcl/common/transforms.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <iostream>
void Processing(const Eigen::Affine3f &transformation_matrix, const pcl::PointCloud<pcl::PointXYZ> &origin_point_cloud, const cv::Mat &projection_matrix, const cv::Mat &cameraMat, const cv::Size &image_size, cv::Point2f &result, bool log_flag = true);
void Processing(const Eigen::Affine3f &transformation_matrix, const pcl::PointCloud<pcl::PointXYZ> &origin_point_cloud, const cv::Mat &projection_matrix, const cv::Mat &cameraMat, const cv::Size &image_size, cv::Point2f &result, bool log_flag){
// Transfrom Points with Parameters
pcl::PointCloud<pcl::PointXYZ> transform_point_cloud;
@harderthan
harderthan / gist:e30f3dbeb98d4e5e3b67ba9edd1d04b9
Created September 4, 2018 12:39
Draw Lane on The image with Opencv
// Draw Lane on The image
cv::Mat laneOverlay = drawImg(cv::Rect(0,0,drawImg.cols, drawImg.rows)).clone();
lane_polylines.push_back(cv::Point(topic_lane[0], topic_lane[1]));
lane_polylines.push_back(cv::Point(topic_lane[2], topic_lane[3]));
lane_polylines.push_back(cv::Point(topic_lane[6], topic_lane[7]));
lane_polylines.push_back(cv::Point(topic_lane[4], topic_lane[5]));
cv::fillConvexPoly(laneOverlay, lane_polylines, cv::Scalar(0, 255, 0), 8);
double alpha = 0.3;
cv::addWeighted(laneOverlay, alpha, drawImg, 1 - alpha, 0, drawImg);
@harderthan
harderthan / CMakeLists.txt
Last active July 30, 2018 07:57
TensorRT_with-ROS_CMakeLists
# by Kwanghoe, kheo1772@gmail.ac.kr
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8.3)
project(rt_example)
add_compile_options(-std=c++11)
#-------------------------------------------------------------------------------
# Find Cuda and Additional packages
if(VIBRANTE)
set(ARCH_DIR "aarch64-linux")