Skip to content

Instantly share code, notes, and snippets.

@nhahv
nhahv / air-verse-air-schema.json
Last active April 11, 2025 08:15
Air-Verse Air
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Air-Verse Air configuration schema",
"description": "Schema for Air-Verse Air live-reload tool configuration files",
"type": "object",
"$defs": {
"colorEnum": {
"oneOf": [
{
"type": "string",
@nhahv
nhahv / users.json
Last active August 13, 2024 08:03
Dummy Data
{
"login": "nhahv",
"name": "Hoร ng Nhรฃ",
"avatar_url": "https://avatars.githubusercontent.com/u/4364929?v=4"
}
@nhahv
nhahv / install.sh
Last active July 9, 2022 04:55
Oh My ZSH Installation
#!/bin/sh
verlte() {
if [ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]; then
return 1
else
return 0
fi
}
OS=
@nhahv
nhahv / settings.json
Created April 6, 2022 07:08
VSCode - CygWin - Zsh (Enter current folder)
{
//Enter current folder to ZSH
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1"
},
"terminal.integrated.profiles.windows": {
"Cygwin": {
"env": {
"CHERE_INVOKING": "1" //(Not working)
},
// ๐Ÿ”ด Error
var hasBarProperty = foo.hasOwnProperty("bar");

// ๐ŸŸข Correct 
var hasBarProperty = Object.prototype.hasOwnProperty.call(foo, "bar");
@nhahv
nhahv / redux-saga-typeguard.ts
Created October 21, 2021 04:41 — forked from NoriSte/redux-saga-typeguard.ts
Redux-saga + Typescript: implementing typeguard for Axios AJAX requests
import { AxiosResponse } from "axios";
// the kind of data I expect from the AJAX request...
interface AuthData {
access_token?: string;
refresh_token?: string;
}
// ... a type dedicated to the Axios response...
type AuthResponse = AxiosResponse<AuthData>;
@nhahv
nhahv / Enable snaps on CentOS.md
Last active September 24, 2021 11:15
[Centos] Centos bash libraries #centos #bash #zsh

Enable snaps on CentOS

sudo yum install -y epel-release
sudo yum install -y snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Usage

@nhahv
nhahv / Cygwin.md
Last active September 23, 2021 11:02
Bash

CYGWIN

"c:\cygwin64\bin\sh" -lic "cd ${OLDPWD-.}; zsh"

@nhahv
nhahv / Emoji.md
Last active September 17, 2021 08:46
Favorites

๐Ÿž ๐Ÿ€ ๐ŸŒป ๐ŸŒผ โšฝ ๐Ÿ€ ๐Ÿšฉ๐ŸŽฏ ๐Ÿ ๐Ÿด ๐Ÿšฉ ๐Ÿช
Weahter โ›… โ˜” ๐ŸŒ‚ ๐ŸŒ€ ๐ŸŒˆ ๐ŸŒ ๐ŸŒŽ ๐ŸŒ ๐Ÿญ ๐Ÿก โ›ช ๐Ÿ•‹ ๐ŸŽช ๐ŸŽก ๐Ÿฐ ๐ŸŒ„ ๐ŸŒŒ ๐ŸŒŠ ๐Ÿ—ป ๐ŸŒ‹ Sign ๐Ÿ›‘ โ›” ๐Ÿšซ ๐Ÿšธ โ›ฝ ๐Ÿšฅ ๐Ÿšฆ ๐Ÿšง ๐Ÿšจ โšก ๐Ÿšน ๐Ÿšบ ๐Ÿšป ๐Ÿšผ ๐Ÿ›ต ๐Ÿš— ๐Ÿš˜ ๐Ÿšš ๐Ÿš› ๐Ÿš ๐Ÿš€ Things ๐Ÿ’Ž ๐Ÿ’ ๐ŸŽ€ ๐Ÿ”” โฐ โŒš โŒ› ๐Ÿ”‘ ๐Ÿ” ๐Ÿ” ๐Ÿ”’ ๐Ÿ”“ ๐ŸŽจ ๐Ÿ’ฃ ๐Ÿงจ ๐ŸŽ ๐ŸŽ‚ ๐ŸŽซ ๐ŸŽฌ ๐Ÿงด ๐Ÿ’Š ๐Ÿฉธ ๐Ÿ’‰ ๐Ÿฉน ๐Ÿงช ๐Ÿงซ ๐Ÿ”ง ๐Ÿ”จ โ› ๐Ÿช“ ๐Ÿงฑ ๐Ÿงฐ ๐Ÿงฒ ๐Ÿช ๐Ÿงฉ ๐Ÿงฏ Tech ๐Ÿ“ท ๐Ÿ“ธ ๐Ÿ“ฑ ๐Ÿ“ž ๐Ÿ“ข ๐Ÿ“บ ๐Ÿ“ป ๐Ÿ’ป ๐ŸŽฎ ๐Ÿ“€ ๐Ÿ’ฝ ๐Ÿ’ฟ ๐Ÿ’พ ๐Ÿ”‹ ๐Ÿ”Œ

@nhahv
nhahv / Expose LoadBalancer Service.md
Last active September 16, 2021 10:01
[Kubenetes] Kubenetes Setup #k8s #setup

Expoise LoadBalancer Service

kubectl --namespace default get service


#NAME                                TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
#kubernetes                          ClusterIP      10.96.0.1       <none>        443/TCP                      19h
#nginx-ingress-xxx                   LoadBalancer   10.102.23.116   <pending>     80:30199/TCP,443:30207/TCP   3m27s
#nginx-ingress-xxx-default-backend   ClusterIP      10.100.69.157   <none>        80/TCP                       3m27s