Skip to content

Instantly share code, notes, and snippets.

View nikomartn's full-sized avatar

Nicolás García Martín nikomartn

  • Salamanca, Spain
View GitHub Profile
@nikomartn
nikomartn / go
Created November 13, 2022 18:49
cgo for windows!
The go experience in windows is very suboptimal, you need to install MSYS2 and mingw and what else..
And cross your fingers to get it working.
But, wsl2 comes to the rescue, even for things like go-gl!
1. Install wsl2
2. (Ubuntu) sudo apt update && sudo apt install mingw-w64
3. .bashrc => alias wingo='GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CGO_ENABLED=1 go'
4. wingo build
@nikomartn
nikomartn / rm_dotnet.sh
Last active August 13, 2022 11:30
rm_dotnet remove *\bin and *\obj from your heavy projects!
alias rm_dotnet='rm -rf $( find . -type d -regex ".*/\(obj\|bin\)" )'
@nikomartn
nikomartn / enum.go
Created May 23, 2022 11:44
Go type enums
package main
import "fmt"
type AnEnum interface {
IAmAnEnum()
}
type Text struct {
text string
@nikomartn
nikomartn / Clean-DotNetProject.ps1
Created June 5, 2021 17:25
Clean-DotNetProject remove *\bin and *\obj from your heavy projects!
Get-ChildItem -Recurse -Directory | Where-Object {$_.Name -eq "obj" -or $_.Name -eq "bin"} | Remove-Item -Recurse