Skip to content

Instantly share code, notes, and snippets.

View hunterwei's full-sized avatar

Hunter Wei hunterwei

View GitHub Profile
@OXY2DEV
OXY2DEV / CMD.md
Last active February 5, 2025 12:29

🔰 A beginners guide to create custom cmdline

showcase

Ever wanted to know how noice creates the cmdline or wanted your own one?

No one? Guess it's just me 🥲.

Anyway, this post is a simple tutorial for creating a basic cmdline in neovim.

@Leenuus
Leenuus / README.md
Last active March 6, 2025 11:07
Display command output in neovim split window

I just implemented a simple but really powerful user command suggested by romainl in lua, running asynchronously using vim.uv API.

In short, this is a command named Redir, which redirect ex command or shell commands stdin/sterr to neovim buffers. So you can view them in split window on the fly.

With Redir, you can do:

  • A good way to inspect your neovim.
" show all your messages in split, I love this one and make it default
@AnsonH
AnsonH / p10k_classic.omp.json
Last active September 27, 2024 17:45
p10k_classic - Custom Oh My Posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "lightYellow",
"style": "plain",
@binki
binki / README.md
Last active January 30, 2025 17:25
Hyper-V/Sandbox Killer WiFi network speed fix powershell commands vEthernet External

See this SO answer.

Disable large send offload in host on vEthernet (to avoid messing with non-virtual adapters). Disable large send offload in guest (including Windows Sandbox!) for all adapters (unable to predict adapter names and probably all of them are real).

@JSinghDev
JSinghDev / LXCBindMount.md
Last active February 3, 2025 09:15 — forked from ajmassi/LXCBindMount.md
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

OR

pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared

@rssnyder
rssnyder / oracle-cloud-free-tier-guide.md
Last active March 12, 2025 17:35
oracle-cloud-free-tier-guide

how to leverage oracle's temping offers

free tier limits

The limits of the free tier say that you can create up to 4 instances.

  • x2 x86 instances (2core/1g)
  • x2 ampere instances (with 4core/24g spread between them)
  • 200GB total boot volume space across all intances (minimum of 50G per instance)

create your account

@deg0nz
deg0nz / iOS-VPN-autoconnect-WireGuard.mobileconfig
Created January 23, 2021 22:18
Connect iOS to WireGuard VPN when connected to untrusted WiFi
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<!-- Connect to VPN when connected to untrusted networks -->
<dict>
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active March 15, 2025 04:32
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window