Skip to content

Instantly share code, notes, and snippets.

View ZhenshengLee's full-sized avatar
🎯
Focusing

VictorLee ZhenshengLee

🎯
Focusing
View GitHub Profile
@allex
allex / gist:11203573
Last active June 3, 2024 13:32
Ubuntu 安装中文字体

环境 (Environment)

版本:Ubuntu 14.04 LTS 默认语言:English(United States)

安装 (Setup)

Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。

@stephenparish
stephenparish / submodule-pull.sh
Created July 15, 2014 15:03
Update submodules in a git repository to the latest, but exclude one..
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master'
@matyunin
matyunin / linux_tune.md
Last active June 7, 2024 06:05
Linux network performance tuning

###Tuning

$ netstat -nao | grep 8080 | grep TIME_WAIT | wc -l

To achieve the top most performance you should tune the source server system limits:

net.ipv4.tcp_max_tw_buckets = 65536

Rsync(Remote Sync):10个实用的例子

| Rsync (Remote Sync): 10 Practical Examples of Rsync Command in Linux

Linux/Unix系统中,同本地操作一样能够进行远程拷贝,同步文件和文件夹的场景中,用得最多的命令就是Rsync(Remote Sync)。 使用rsync命令,可以用来在本地,远程机器之间拷贝同步文件,文件夹;能够跨文件夹,跨硬盘和网络;进行数据备份;制作机器镜像。

该文章包含了简单和高级的10个例子,解释了使用rsync命令将文件在本地和远程的linux机器之间传递。 运行rsync命令并不需要root用户的权限。

@ryerh
ryerh / tmux-cheatsheet.markdown
Last active July 27, 2024 16:25 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@awesomebytes
awesomebytes / Malformed_STL_fix.md
Last active August 1, 2023 05:11
How to fix a malformed stl (says Rviz)

Fix malformed stl (says Rviz)

To correct:

The STL file 'package://wsg_50_simulation/meshes/WSG-FMF.stl' is malformed. It starts with the word 'solid', indicating that it's an ASCII STL file, but it does not contain the word 'endsolid' soit is either a malformed ASCII STL file or it is actually a binary STL file. Trying to interpret it as a binary STL file instead.

When launching Rviz with a URDF containing SolidWorks created meshes in STL.

Just go to the folder with STL's with this problem and do:

@evanwill
evanwill / gitBash_windows.md
Last active July 16, 2024 23:51
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@o-zombi-o
o-zombi-o / raw_speed_test_client.cpp
Created November 27, 2016 16:29
Example boost TCP client/server.
#include <thread>
#include <chrono>
#include <vector>
#include <signal.h>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
namespace
{
bool keepGoing = true;
@insaneyilin
insaneyilin / show_opencv_image_in_opengl.cpp
Last active July 24, 2024 02:37
Show opencv cv::Mat image in an OpenGL window(use GLFW)
/*
# Released under MIT License
Copyright (c) 2017 insaneyilin.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@crittermike
crittermike / wget.sh
Last active March 26, 2024 22:49
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.