Skip to content

Instantly share code, notes, and snippets.

View zhanghanduo's full-sized avatar
🎯
Focusing

Zhang Handuo zhanghanduo

🎯
Focusing
View GitHub Profile
@zhanghanduo
zhanghanduo / knownpaths.py
Created June 22, 2020 04:11 — forked from mkropat/knownpaths.py
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
@zhanghanduo
zhanghanduo / zshrc
Created May 31, 2019 03:00
config backup
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@zhanghanduo
zhanghanduo / opencv_with_cuda.md
Created May 27, 2019 13:09
opencv with cuda

cmake -D CMAKE_BUILD_TYPE=RELEASE
-D ENABLE_PRECOMPILED_HEADERS=OFF
-D BUILD_NEW_PYTHON_SUPPORT=ON
-D CMAKE_INSTALL_PREFIX=/usr/local
-D INSTALL_C_EXAMPLES=OFF -D WITH_TBB=ON
-D INSTALL_PYTHON_EXAMPLES=OFF
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.3/modules
-D BUILD_EXAMPLES=OFF
-D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_V4L=ON
-D BUILD_opencv_dnn=OFF \

@zhanghanduo
zhanghanduo / ros
Created May 9, 2019 11:55
ros melodic
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
git \
build-essential \
apt-utils \
cmake \
vim \
wget \
tmux \
gcc-multilib \
g++-multilib \
@zhanghanduo
zhanghanduo / basic.vim
Created May 4, 2019 07:37
Basic vim config file for remote server or docker image. After installing vim, type "cat basic.vim > ~/.vimrc"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic — @amix3k
"
" Awesome_version:
" Get this config, nice color schemes and lots of plugins!
"
" Install the awesome version from:
"
" https://github.com/amix/vimrc
@zhanghanduo
zhanghanduo / myros.sh
Created February 13, 2019 03:38
ros info neofetch
#!/bin/bash
# This program setting ROS environment
# Please keyin {ROS_BUILDWS_NAME}, {USER_NAME} and {ROS_CATKINWS_NAME} string, then edit .bashrc add one line "source ~/myros.sh"
#
#PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
#export PATH
USER_NAME='hd'
ROS_USE_ROSBUILD='0'
ROS_INFO_TIME='1'
# ROS_BUILDWS_NAME='catkin_ws'
printf("\033[2J\033[1;1H");
@zhanghanduo
zhanghanduo / find_txt.sh
Created July 5, 2018 07:20
find all txt files #linux
#find all .txt files under current directory
find . -name "*.txt" | xargs rm
#copy all .txt files under current directory to another folder
@zhanghanduo
zhanghanduo / env_ROS.sh
Created May 7, 2018 09:56
select ROS or anaconda
#!/bin/bash
echo "Recover the envrionment of ROS (Anaconda cannot be used thus)...:("
unset PYTHONPATH
source $HOME/.zshrc
@zhanghanduo
zhanghanduo / Zhang_handuo.md
Created April 13, 2018 05:36
Funny ascii text #funny #tips

|___ / | | | | | | |
/ /| |__ __ _ _ __ __ _ | || | __ _ _ __ | | _ ___
/ / | '
\ / _ | '_ \ / _ | | __ |/ _ | '_ \ / _ | | | |/ _ \ / /
| | | | (| | | | | (| | | | | | (| | | | | (| | || | () | /__|| ||_,|| ||_, | || ||_,|| ||_,|_,_|_/ / |
|
/