Skip to content

Instantly share code, notes, and snippets.

View kenny-lee-1992's full-sized avatar
🤒
Out sick

Kenny kenny-lee-1992

🤒
Out sick
View GitHub Profile
@kenny-lee-1992
kenny-lee-1992 / alacritty-tmux-vim_truecolor.md
Created November 10, 2021 04:28 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Tested successfully in bash and zsh with latest packages from Arch Linux (with exception of neovim built from source):

  • 2019-07-07
  • 2021-08-07

Notes

  1. Don't use &t_8f, &t_8b and t_Co in your vim config
  2. Don't set $TERM in your zshrc, bashrc, etc. Configure this in your terminal (alacritty).
@kenny-lee-1992
kenny-lee-1992 / .vimrc
Last active April 14, 2021 04:38 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@kenny-lee-1992
kenny-lee-1992 / paging.ts
Created January 25, 2019 02:17
Generate paging with js
public paging(current, pagesize, total) {
const totalpages = Math.ceil(total / pagesize);
const pageInfo = {
// Assign to the scope in paging
totalpages: totalpages,
// clear array before pushing new items
pageArr: [],
};
// if page is 1 or 0 return, no need of paging
@kenny-lee-1992
kenny-lee-1992 / arduino.text
Last active May 3, 2018 02:56
Chuông Đố Vui Giáo Lý
// ===== CHUÔNG THI ĐỐ VUI =====
// Khi người dùng nhấn nút thì tín hiệu đèn led tương ứng với nút nhấn sẽ sáng
// + Đèn sẽ sáng trong 5 giây sau đó tắt
// + Trong lúc đèn sáng thì những nút khác sẽ không thể nhấn trừ nút RESET
// + Nếu chưa hết 5s, nút RESET có thể được nhấn để reset lại trạng thái ban đầu
int LED1 = 2;
int LED2 = 3;
int LED3 = 4;
int LED4 = 5;
git filter-branch --env-filter '
OLD_EMAIL="long.ho"
CORRECT_NAME="Minh Long"
CORRECT_EMAIL="hominhlong.it@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]