Skip to content

Instantly share code, notes, and snippets.

View hotrungnhan's full-sized avatar
🏠
Working from home

Kudou Sterain hotrungnhan

🏠
Working from home
  • https://tego.global/
  • Vietnam
View GitHub Profile
@hotrungnhan
hotrungnhan / A Simple JSON Math Parser Lexical.md
Last active March 24, 2024 10:01
Simple JSON Math evaluate

Simple JSON Math evaluate

@hotrungnhan
hotrungnhan / mac-os-keyboard-mapper.md
Last active August 5, 2022 19:51
Map keyboard macos

ref Apple modifer key map is bull of shit. swap obfucated any key, left to right right to left , dang , then i figure it out how to config it thanks a post. Now to can set it as you want like the guid below.

Macbook keyboard map

Key Code / left right
no action 30064771072
@hotrungnhan
hotrungnhan / mdm-disable.sh
Last active July 24, 2022 04:34
Disable mdm
echo '################ SECTION MDM MDM HIDING | CODE GENERATED !! | DONT REMOVE IT ###################' >> /private/etc/hosts
echo '############################## DONT REMOVE #############################' >> /private/etc/hosts
echo '0.0.0.0 iprofiles.apple.com' >> /private/etc/hosts
echo '0.0.0.0 deviceenrollment.apple.com' >> /private/etc/hosts
echo '0.0.0.0 mdmenrollment.apple.com' >> /private/etc/hosts
echo '0.0.0.0 gdmf.apple.com' >> /private/etc/hosts
for var in "$@"
do
echo "0.0.0.0 $var" >> /private/etc/hosts
@hotrungnhan
hotrungnhan / macosx.batch
Last active August 5, 2022 19:52
Docker command to run macos image with 16 gb ram 8 cpu
docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -e RAM=16 -e SMP=8 -e CORES=8 --name htn.macos sickcodes/docker-osx:latest
@hotrungnhan
hotrungnhan / index.js
Last active December 23, 2021 11:25
Map key,value from old object to new key,value object and log it into console.
//example
// obj {
// a:0,
// b:1
// }
// output {
// a1:1,
// a2:2
// }
console.log(JSON.stringify(Object.fromEntries(Object.entries("your object with key value").map(([key,value])=>{
@hotrungnhan
hotrungnhan / .bashrc
Last active December 29, 2021 06:22
Pretty bashrc like kali linux
# install via
# wget -O - https://gist.github.com/hotrungnhan/7b7a4a479fc9825fb342e2a6e50b2672/raw/install.sh | bash | exit
###################################################################################################
# This is a very simple .bashrc file that I'm using on a daily basis. #
# It completely replaced my zsh setup, and should be relatively simple to understand and modify. #
# #
# Built by Moritz (mo-mar.de) - just do whatever you want with it, according to the Unlicense: #
# https://choosealicense.com/licenses/unlicense/ #
# #
# Simple installation: #