Skip to content

Instantly share code, notes, and snippets.

View openhoangnc's full-sized avatar
🌊
coding for living

Nguyen Cong Hoang openhoangnc

🌊
coding for living
  • Vietnam
View GitHub Profile
@openhoangnc
openhoangnc / wm_info.bash
Created September 1, 2018 04:53
Get WM_CLASS of active window
#!/bin/bash
ACTIVE_WINDOW=""
while true
do
sleep 0.5
NEW_ACTIVE_WINDOW=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)
VBoxManage modifyvm "MacOS" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
@openhoangnc
openhoangnc / install_lastest_golang.sh
Last active January 24, 2018 11:54
Install lastest golang
#!/bin/sh
#sudo curl https://gist.githubusercontent.com/openhoangnc/1bb591e8843ac111c0661f5615eda0e1/raw/51933d70dd3e384cca69c0fdd835f6243ad38d12/install_lastest_golang.sh | sh
GOVERSION=1.9.3
GOOS=linux
GOARCH=amd64
TARFILE=go$GOVERSION.$GOOS-$GOARCH.tar.gz
TARFILEFULL=/tmp/$TARFILE
PROFILE=/etc/profile.d/golang.sh