Skip to content

Instantly share code, notes, and snippets.

View AirManH's full-sized avatar
🎓
postgraduate

Air AirManH

🎓
postgraduate
View GitHub Profile
" ===== Basic
" do not make vim compatible with vi.
set nocompatible
" Disable the mouse.
set mouse=
set ttymouse=
" use utf-8 encoding.
set encoding=utf-8
" use 256-bit colors.

Cheatsheet for ffmpeg and sox

Examples

To wechat

  • -vf scale=960:-1: scale the resolution to 960*a (a is calculated automatically)
  • -b:v: set video bitrate in bps
  • -r: framerate in FPS
  • -b:a: set audio bitrate in bps
@AirManH
AirManH / pcl-cmake-example.org
Created May 31, 2021 14:55
Use PCL in modern CMake: A simple example

Motivation

The example CMakeLists.txt in PCL’s doc is a bit outdated. Commands like include_directories, link_directories, add_definitions should be replaced or avoid. Instead, in modern CMake we should use target-specific commands like target_include_directories, target_link_libraries.

Files

vim and regex cheatsheet

Search and Replace

See also this fandom vim wiki page.

Basic:

  • :s/find/replace/, only search in current line, and replace the first matched pattern
@AirManH
AirManH / start-gnome-terminal.ahk
Last active November 18, 2020 13:00
press Meta + Enter to open gnome-terminal in WSL
;; Description:
;; press Meta + Enter to open gnome-terminal in WSL
;; requirement:
;; - vcxsrv
;; - wsl
;; - gnome-termial (in wsl)
#Enter::
;; if vcxsrv not exist, start it
Process, Exist, vcxsrv.exe
if (not ErrorLevel) {
@AirManH
AirManH / xorg_config.org
Last active October 1, 2020 05:50
xorg config files

xorg config files

Dual Monitor

See this nvidia page for details.

Introduction

-----------------------       -----------------------------
@AirManH
AirManH / org_cheat.org
Last active March 24, 2021 08:36
org-mode cheat sheet

org-mode cheat sheet

Document Structure

Visibility Cycling

KeyShort NameDescription
<TAB>Subtree cycling-> FOLDED -> CHILDREN -> SUBTREE->