Skip to content

Instantly share code, notes, and snippets.

@laeis
laeis / local_ip.go
Created December 30, 2022 17:21 — forked from miguelmota/local_ip.go
Golang get local IP
package network
import (
"errors"
"net"
)
// LocalIP get the host machine local IP address
func LocalIP() (net.IP, error) {
ifaces, err := net.Interfaces()
@laeis
laeis / vagrant-vscode-php-xdebug-instructions.md
Created October 16, 2018 18:49 — forked from jamesstout/vagrant-vscode-php-xdebug-instructions.md
Configure Xdebug, Visual Studio Code for a Vagrant VM

0. Assumptions

  • You've installed Xdebug in your VM.
  • You've installed Xdebug extension for VSCode and reloaded/restarted VSCode.
  • You have not forwarded port 9000 from the guest to the host.
  • Configure Debugger in VSCode. See item 1 next.

1. Configure .vscode/launch.json