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
  • 04:39 (UTC +08:00)
View GitHub Profile
for dir in */; do
if [ ! -d "${dir}.git" ]; then
continue
fi
pushd ${dir} > /dev/null
echo ${dir}$(git branch --show-current)
git pull
popd > /dev/null
done
@xqm32
xqm32 / symlink.sh
Last active November 9, 2023 06:35
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 / 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]
@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 / notes.md
Last active December 11, 2023 08:23
@xqm32
xqm32 / GLFH.md
Created December 19, 2023 14:40
Graceful Launch for HMCL
@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

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.

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)
}