Skip to content

Instantly share code, notes, and snippets.

View xqm32's full-sized avatar
🎯
Focusing

Qiming Xu xqm32

🎯
Focusing
  • Hefei University of Technology
  • Hefei, China
  • 03:49 (UTC +08:00)
View GitHub Profile
@xqm32
xqm32 / alacritty.md
Last active April 24, 2024 10:17
Automatically switch color theme for Alacritty on macOS

Original issue comment: alacritty/alacritty#5999 (comment)

Run the following command to clone themes:

mkdir -p ~/.config/alacritty/themes
git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes

Add the following content to ~/.config/alacritty/alacritty.toml:

import { $ } from 'bun'
async function compile(code: string) {
const hasher = new Bun.CryptoHasher("sha256").update(code)
const destination = hasher.digest("hex").substring(0, 6) + ".c"
Bun.write(destination, code)
await $`gcc ${destination} -o ${destination}.out`
const output = await $`./${destination}.out`.text()
console.log(output)
}

Windows Subsystem for Linux Setup

APT

Install zsh and change the login shell to zsh.

Homebrew

Install necessary zsh plugins and activate them in .zshrc.

@xqm32
xqm32 / fish.md
Last active January 22, 2024 06:11
Fish Shell Setup
install fish and setup fish shell
install homebrew and config homebrew
use homebrew install starship and set preset to plaintext
use homebrew install pyenv and pipx
install nvm and sdkman via script
install fisher for fish shell plugin
use fisher install nvm.fish and sdkman-for-fish
@xqm32
xqm32 / GLFH.md
Created December 19, 2023 14:40
Graceful Launch for HMCL
@xqm32
xqm32 / notes.md
Last active December 11, 2023 08:23
@xqm32
xqm32 / VCB.md
Last active February 20, 2024 05:42
VS Code Bugs

[Python] Unexpected virtual environment activating microsoft/vscode#180486

For workspace like:

.
├── AandB.code-workspace
├── DirA
│  ├── A.py
│ └── venvA
@xqm32
xqm32 / PPP.md
Last active December 6, 2023 09:19
Python Project Practice

This practice is for Unix

Python Environment Preparation

Tools Installation

  1. Use [Homebrew] to install [Pipx]
  2. Use Pipx to install [Poetry] and [Tox]
  3. Use Homebrew (or official installer) to install [Pyenv] and [Pyenv-virtualenv]
import json
from typing import Any, List
from httpx import Client
class CardSquare:
"""
https://webstatic.mihoyo.com/ys/event/bbs-lineup-qskp/index.html#/pc/publish
"""
@xqm32
xqm32 / symlink.sh
Last active November 9, 2023 06:35