Skip to content

Instantly share code, notes, and snippets.

@h4n2k
h4n2k / gist:a08b3380a0baedb6ac4debacc07237f8
Last active December 10, 2023 11:57
Arch Linux File /var/cache/pacman/pkg/syncthing-1.27.0-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature))
sudo pacman-key --list-sigs alerque@archlinux.org
sudo pacman-key --delete CCB34EBBB9541EF3F7B366C1D4A753468A5A5B67
sudo pacman-key --lsign-key CCB34EBBB9541EF3F7B366C1D4A753468A5A5B67
# if error could not be locally signed
# try run
sudo pacman-key --populate archlinux
@h4n2k
h4n2k / gist:b62abdedddf2b06023b44457e47a28f4
Last active September 23, 2023 09:51
Arch linux - Keychron K8 Pro Failed to open the device when usevia.app
# open the VIA website
https://usevia.app
#if use brave check on
brave://device-log/
# should show error like
Failed to open '/dev/hidraw4': FILE_ERROR_ACCESS_DENIED
# check
@h4n2k
h4n2k / .zshrc
Last active February 1, 2024 16:06
Multiple neovim
# Neovim Switcher
# https://gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b
#
alias nvim-lazy="NVIM_APPNAME=LazyVim nvim"
alias nvim-kick="NVIM_APPNAME=kickstart nvim"
alias nvim-chad="NVIM_APPNAME=NvChad nvim"
alias nvim-astro="NVIM_APPNAME=AstroNvim nvim"
function nvims() {
items=("default" "kickstart" "LazyVim" "NvChad" "AstroNvim")
@h4n2k
h4n2k / gist:6ad42542764d7d418e8251f63bffe738
Created January 3, 2023 01:25
step run bleachbit macos (ventura)
requirement
python3
pip
brew install py3cairo
brew install gtk+3
pip3 install gobject pygobject
git clone https://github.com/bleachbit/bleachbit.git
git checkout macos
@h4n2k
h4n2k / gist:723575ffd9af6cbaafd4f9ba09fcaa61
Created March 17, 2022 09:44
Arch linux - Cannot mix incompatible Qt library (5.15.2) with this library (5.15.3)
yay -S qt5-styleplugins
@h4n2k
h4n2k / gist:ff5adc10d9d511afac7d47e3a824f1f2
Created July 11, 2021 07:09
install phoenix framework - elixir lang - arch linux
yay elixir
elixir -v
mix archive.install hex phx_new 1.5.9
mix archive.install github hexpm/hex branch latest
mix archive.install hex phx_new 1.5.9
yay inotify-tools
mix phx.new hello
@h4n2k
h4n2k / gist:14dbc537f1e7fb1f0e5eb939fe2bd4e1
Created May 23, 2021 03:12
Git ignore file mode changes
git config core.fileMode false
@h4n2k
h4n2k / gist:9e6f4a0c33f0ab7956dc654082e9481b
Last active September 14, 2020 01:52
QtFatal: Cannot mix incompatible Qt library (5.15.0) with this library (5.15.1) -- archlinux - copyq
yay -Rdd qt5-styleplugins
yay qt5-styleplugins
@h4n2k
h4n2k / strong-password-regex.md
Created August 23, 2020 14:29 — forked from arielweinberger/strong-password-regex.md
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
@h4n2k
h4n2k / gist:4fe204d72468bb9d147741c1572a23d8
Created January 8, 2020 08:15
Git Delete Local and Remote Tags
Delete a local Git tag
$ git tag -d <tag_name>
Delete a remote Git tag
$ git push origin :refs/tags/<tag>