Build Go programs with GitHub modules present

    I was hit with an error when I try to run a Go script, go run somescript.go. This is a note to my future self, in case I totally forgot. 1 no required module provides package go.mod file not found in current directory or any parent directory; see 'go help modules' I need to run the command below. 1 go mod init somescript.go Then it will output the following lines.

    Read More

    Sharing from Linux to macOS

    Note: The OS versions I used here are macOS Sonoma 14 Beta 3 and Fedora Workstation 38. On the first try, I was supposed to enable file sharing from macOS and access it on my Fedora machine. But Apple’s Samba did not work. So, I tried the opposite instead. Install and Setup Samba on Fedora 1 2 3 4 5 sudo dnf install samba sudo systemctl enable smb --now firewall-cmd --get-active-zones sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-service=samba sudo firewall-cmd --reload Make sure the user already exists in fedora, in my case lwgmnz@fedora.

    Read More

    SwiftUI Tap Anywhere

    Today I learned how to implement tap anywhere to dismiss the keyboard on SwiftUI. In your parent stack, either VStack or HStack, add the following code. 1 2 3 4 .contentShape(Rectangle()) .onTapGesture { UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) } The most important thing to take note here is the contentShape modifier or tap gesture will not work.