Skip to content

Instantly share code, notes, and snippets.

View vtvh's full-sized avatar

Việt Hải vtvh

View GitHub Profile
@vtvh
vtvh / setxkbd.md
Created June 28, 2026 07:19
Help me to setup keyboard in linux. prefer a universal way despite the fuzz about wayland/x11. capslock as ctrl keep the left ctrl as-is right control as capslock

Capslock as Ctrl

To bypass the entire Wayland vs. X11 headache completely, you need to step down to the kernel level. The most reliable, lightweight, and modern universal tool for this is keyd. Because keyd hooks directly into evdev (the Linux kernel input subsystem), your keybindings will work flawlessly across GNOME, KDE, Hyprland, Sway, the virtual TTY console, and any display server. Here is how to set it up to achieve exactly what you want:

Step 1: Install keyd

Install it using your distribution's package manager:

  • Ubuntu / Debian / Linux Mint:
    sudo apt install keyd
Perfect. Looking at your terminal, we have exactly what we need.
Here is the translation of your partition table:
* **EFI System Partition:** /dev/nvme0n1p1 (This is where the bootloader lives)
* **Linux Filesystem (Root):** /dev/nvme0n1p5 (This is your Parrot OS)
Here are the exact commands you need to run in your terminal, one by one. I have plugged your specific partition numbers in for you.
### Step 1: Mount the Partitions
1. Mount your Parrot OS root partition:
```bash
sudo mount /dev/nvme0n1p5 /mnt

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@vtvh
vtvh / nuiDinh.md
Created October 25, 2025 02:24
note for travelling

Note

Chill núi Dinh Chúa Nhật

Chuẩn bị

Items nen co

Tập trung 5h Hàng Xanh

GG Maps

Tip nhỏ sử dụng Perplexcity và NotebookLM.

  • Trong số các Provider về search thì Perplexity nổi trội về tìm dữ liệu chính xác và đáng tin cậy. Đặc biệt là tuỳ vào nhu cầu search mà mình có thể lựa chọn nguồn dữ liệu là Web, Paper hay Social.
  • Tuy nhiên, việc tiếp tục hỏi sâu về thông tin trong dữ liệu tìm được thì Perplexity tỏ ra khá là tò tí te. Cứ như hai người khác nhau vậy.
  • Chính vì vậy nên mình thường yêu cầu perplexity thực hiện tác vụ deep research nhưng không thực hiện tổng hợp mà thay vào đó yêu cầu nó trả lại link nguồn mà thôi.
  • Bằng cách này, mình lấy đống link mà perplexity thu thập về và nhét vào NotebookLM để tiến hành mổ xẻ ngấu nghiên, đào sâu về chủ đề mà mình muốn tìm hiểu hơn.
@vtvh
vtvh / 1.md
Last active March 23, 2024 07:09
AI workshop with Ths.Phát & Bình Nguyễn 22.03.2024

Cập nhật thuật toán SEO 2024

  • Đợt cập nhật thuật toán cốt lõi 5.3.2024

Kinh nghiệm ng trong cuộc, bắt bệnh

AI SEO v.2024 / AI Phai sinh

url='https://www.g2.com/products/campaign-monitor-by-marigold/reviews'
❯ python testEcommerce.py
{'job': {'_links': [{'href': 'http://data.oxylabs.io/v1/queries/7168522648094259201',
'method': 'GET',
'rel': 'self'},
{'href': 'http://data.oxylabs.io/v1/queries/7168522648094259201/results',
'method': 'GET',
'rel': 'results'},
{'href': 'http://data.oxylabs.io/v1/queries/7168522648094259201/results?type=raw',
// De Thi 1
// 15.08.2023
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 20
struct City
// De Thi 1
// 15.08.2023
#include <stdio.h>
#include <stdlib.h>
#define MAX 20
struct CannedMilk
{
// De Thi 1
// 15.08.2023
#include <stdio.h>
#include <stdlib.h>
#define MAX 20
struct CannedMilk
{