Skip to content

Instantly share code, notes, and snippets.

@khanghh
khanghh / eslint.config.js
Created March 22, 2025 10:11
Nuxtjs eslint config
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
export default createConfigForNuxt(
{
features: {
stylistic: {
semi: false,
indent: 2,
quotes: 'single',
},
@khanghh
khanghh / hook.js
Last active December 30, 2021 12:35
ttl
const IL2CPPLIB = 'libil2cpp.so'
const TOLUALIB = 'libtolua.so'
// $ nm --demangle --dynamic libfoo.so | grep "Class::method("
// nm --gD libcocos2djs.so | grep _ZN7cocos2d9FileUtils13decodeGsnDataEPhli
var baseAddress = null
var luaState = ptr(0x7561203378)
var luaL_loadbufferPtr = ptr(0x7557d5092c)
var lua_pcallPtr = ptr(0x7557d46a04)
@khanghh
khanghh / settings.json
Last active March 9, 2025 12:45
My vscode settings
{
//#region Editor
"window.commandCenter": false,
"workbench.colorTheme": "Default Dark+",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"explorer.enableDragAndDrop": false,
"explorer.autoReveal": true,
"editor.tabSize": 2,
"editor.dragAndDrop": false,
@khanghh
khanghh / self-signed-certificate-with-custom-ca.md
Created November 2, 2020 03:07 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@khanghh
khanghh / repo-rinse.sh
Created May 18, 2020 07:24 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@khanghh
khanghh / .vimrc
Created April 24, 2019 08:18
My vim config
" Plugin {{{
call plug#begin('~/.vim/plugged')
Plug 'christoomey/vim-tmux-navigator'
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug '/home/linuxbrew/.linuxbrew/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
@khanghh
khanghh / hide_cmdline.vimrc
Last active April 10, 2019 07:55
hide comment line vim
set lines+=1
let s:is_cmdline_open = 0
function! s:cmdline(key)
if a:key ==# ':'
if !s:is_cmdline_open
let &lines-=1
let s:is_cmdline_open = 1
redraw
endif
@khanghh
khanghh / sakura.conf
Created April 5, 2019 13:07
sakura config
[sakura]
colorset1_fore=rgb(211,215,207)
colorset1_back=rgb(30,39,46)
colorset1_curs=rgb(255,255,255)
colorset1_key=F1
colorset2_fore=rgb(211,215,207)
colorset2_back=rgba(38,38,38,0.99)
colorset2_curs=rgb(255,255,255)
colorset2_key=F2
colorset3_fore=rgb(192,192,192)
@khanghh
khanghh / config
Created March 21, 2019 13:14
ssh-config
Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
@khanghh
khanghh / blockblockadblock.user.js
Created January 30, 2019 15:58
BlockBlockAdBlock
// ==UserScript==
// @name BlockBlockAdBlock
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://maclife.vn/*
// @match https://blockadblock.com/*
// @grant none
// ==/UserScript==