Skip to content

Instantly share code, notes, and snippets.

View kLiHz's full-sized avatar

kLiHz kLiHz

View GitHub Profile
@faywong
faywong / rime_ime_work_flow.md
Last active May 20, 2024 03:21
rime IME 流程简析

抱歉,本文在 Gentoo Linux Rime 输入法下写成,由于缺乏敏捷的截图工具,本文图片较少(UML 图后期再补)。请将就读完。

基础

术语

  • schema -> 输入法方案,比如 朙月拼音、倉頡五代,其 schema id 分别为:luna_pinyin、cangjie5

  • compose -> 选词组句

@faywong
faywong / how_to_renew_clione_eap.sh
Last active April 24, 2024 17:54
How to renew clion EAP
# CLion EAP: https://www.jetbrains.com/clion/nextversion/
# ref: https://stackoverflow.com/questions/26584948/how-do-i-remove-my-intellij-license-in-2019-3
rm -rf Library/Application Support/JetBrains/CLion*
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active June 10, 2024 08:01
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is tigervnc-standalone-server.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working WSL2 installation.

@ld100
ld100 / ArchLinuxWSL2.md
Last active June 17, 2024 20:37
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@dhkatz
dhkatz / msys2-visual-studio-code.md
Last active June 2, 2024 21:03
Using MSYS2 with Visual Studio Code

Using MSYS2 with Visual Studio Code is extremely easy now thanks to the Shell Launcher extension by Tyriar.

First, install the extension and reload Visual Studio Code.

Then, open the settings.json to edit your settings.

Add the field shellLauncher.shells.windows. I recommend using autocompletion here so that all the default shells are added.

You should having something like this now:

@htfy96
htfy96 / static_inline_example.md
Last active April 11, 2024 14:13
static inline vs inline vs static in C++

In this article we compared different behavior of static, inline and static inline free functions in compiled binary. All the following test was done under g++ 7.1.1 on Linux amd64, ELF64.

Test sources

header.hpp

#pragma once

inline int only_inline() { return 42; }
static int only_static() { return 42; }