Skip to content

Instantly share code, notes, and snippets.

View ryuheechul's full-sized avatar
💻
hacking on projects!

Heechul Ryu ryuheechul

💻
hacking on projects!
View GitHub Profile
@ryuheechul
ryuheechul / python-dev-on-nixos.md
Last active May 2, 2024 07:33
Python dev on NixOS

Does it look familiar?

Welcome to an error like this below.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/user/python-proj/main.py", line 2, in <module>
 import grpc
@ryuheechul
ryuheechul / openwrt-efi-on-proxmox.md
Last active April 14, 2024 06:06
How to "Install" an OpenWRT VM in Proxmox with UEFI

Existing references I looked at before I went on trial and error until eventually I managed to make it work:

Note

Although links above were good references to look at so I didn't have to start from scratch, following none of them actually worked for me. Hence, I'm leaving my own note after figuring things out.

My situation:

@ryuheechul
ryuheechul / python_literal_type_checking.py
Last active March 27, 2024 21:38
ensure literal type from a dynamic value by employing "guard" function in python
"""
seems like hard coding is the only way to make literal type to accept anything to be literal
(which makes sense if you think about it)
"""
from typing import Any, Literal
my_literal_type = Literal["a", "b", "c"]
@ryuheechul
ryuheechul / windows.md
Last active March 13, 2024 02:23
Let that Windows 10/11 be a bit friendlier

An attempt to make Windows 10/11 work for me by customizing/personalizing it

Why gist not dotfiles?

I use dotfiles to personalize *nix type of machines. But I'm new to personalizing Windows 10. So I'm collecting information here first before adding these to the dotfiles. I'm not sure if these will ever move to dotfiles though.

Enable WSL2

@ryuheechul
ryuheechul / build-accelerated-kvm-guest-custom-kernel-for-wsl2.md
Last active March 12, 2024 23:53
Build An Accelerated KVM Guest Custom Kernel for WSL 2

I'm not the author the blog post and this gist is a simply a note on my usage based on the original post, https://boxofcables.dev/kvm-optimized-custom-kernel-wsl2-2022/.

I also changed the code that extract the latest to a concrete linux kernel version.

First start with openSUSE Tumbleweed distro and commands below can be used to build the custom kernel and set it to be used for WSL2 distros.

# prepare build deps
sudo zypper -n up
# original from the post
@ryuheechul
ryuheechul / README
Created February 23, 2024 16:54 — forked from glts/README
Benchmark for Vim regexp engine performance
Regular expressions and data from
http://lh3lh3.users.sourceforge.net/reb.shtml
Regular expressions benchmarked:
URI ([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?
Email ([^ @]+)@([^ @]+)
Date ([0-9][0-9]?)/([0-9][0-9]?)/([0-9][0-9]([0-9][0-9])?)
URI|Email ([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)
Word .*SCSI-

I actually didn't really know about the difference between $@ and "$@" until now.

I always had assumed that "$@" is not desirable thinking this would deliver argsments as just one.

Turns out that's not true and you can read about it from man bash.

@     Expands  to  the  positional  parameters,  starting from one.  In contexts where
       word splitting is performed, this expands each positional parameter to a separa
      te word; if not within double  quotes, these words  are  subject to word splitti
@ryuheechul
ryuheechul / 0-meta.md
Last active January 20, 2024 21:12
NixOS on Microsoft Surface Pro 8

NixOS on Microsoft Surface Pro 8

What Is This Note About

This is mostly a short version of information dump and sharing my experience regarding installing (and using) NixOS on Microsoft Surface Pro 8 device.

TL;DR:

@ryuheechul
ryuheechul / terminal-buddies.md
Last active January 19, 2024 18:33
My terminal buddies