vboxsf is not available

===> XXXX: Mounting shared folders … the filesystem “vboxsf” is not available. … $ vagrant plugin install vagrant-vbguest

VirtualBox CLI commands

$ vboxmanage list vms $ vboxmanage list runningvms $ vboxmanage startvm [VM name] $ vboxmanage controlvm [VM name] poweroff $ vboxmanage controlvm [VM name] acpipowerbutton $ vboxmanage unregistervm [VM name] –delete

Draw UML from VSCode

# Requirement: Java should be installed on your machine 1. Search PlantUML from Marketplace in VSCode 2. Install PlantUML 3. Create a file with the “.plantuml” extension ex) squence.plantuml 4. Start with “@startuml” 5. Write down some script code (reference: https://0x010.com/uploads/PlantUML_Language_Reference_Guide_ko.pdf) 6. End with “@enduml” 7. See the corresponding UML by typing “Alt + D”

Install OpenJDK on MacOS

$ brew tap adoptopenjdk/openjdk $ brew search jdk $ brew install –cask adoptopenjdk11

Install L2TP over IPSec on Ubuntu

1. Installation $ sudo apt-get update $ sudo apt-get -y install strongswan xl2tpd 2. Configuration $ sudo vi /etc/ipsec.conf ## == ## config setup conn %default ikelifetime=60m keylife=20m rekeymargin=3m keyingtries=1 keyexchange=ikev1 authby=secret ike=aes128-sha1-modp1024,3des-sha1-modp1024! esp=aes128-sha1-modp1024,3des-sha1-modp1024! conn L2TP-PSK keyexchange=ikev1 left=%defaultroute auto=add authby=secret type=transport leftprotoport=17/1701 rightprotoport=17/1701 # set this to the ip address of your vpn server right=[VPN […]

Mount a directory though NFS

$ sudo apt-get install nfs-common $ sudo mkdir /directory-to-mount $ sudo mount [NFS Server IP Address]:[Path] /directory-to-mount

Install gosec

$ go get -u github.com/securego/gosec/v2/cmd/gosec $ gosec ./…

[Go] Get the network info for a network interface

func GetNetwork(ifname string) string { if interfaces, err := net.Interfaces(); err == nil { for _, iface := range interfaces { if iface.Name == ifname { addrs, err := iface.Addrs() if err != nil { panic(err) } ipaddr := strings.Split(addrs[0].String(), “/”)[1] return ipaddr } } } return “” }

[Go] Get the IP address assigned to a network interface

func GetIPAddr(ifname string) string { if interfaces, err := net.Interfaces(); err == nil { for _, iface := range interfaces { if iface.Name == ifname { if addrs, err := iface.Addrs(); err == nil { ipaddr := strings.Split(addrs[0].String(), “/”)[0] return ipaddr } return “” } } } return “” }

[Go] Get the network interface for the external access

func GetExternalInterface() string { route := “” res := exec.Command(“ip”, []string{“route”}…) if out, err := res.Output(); err == nil { route = string(out) } routeData := strings.Split(strings.Split(route, “\n”)[0], ” “) for idx, word := range routeData { if word == “dev” { return routeData[idx+1] } } return “” }