Skip to content

Instantly share code, notes, and snippets.

View LfJohnVo's full-sized avatar
:shipit:
Focusing

John Vo LfJohnVo

:shipit:
Focusing
View GitHub Profile
@LfJohnVo
LfJohnVo / fyne_windows.md
Created June 12, 2025 18:14 — forked from bunnykek/fyne_windows.md
Installing fyne in Microsoft Windows Go lang

These are the steps which I have followed and it worked for me.

  1. Download Go from the download page and follow instructions. https://golang.org/dl/
  2. Install TDM-GCC compiler https://jmeubank.github.io/tdm-gcc/download/
  3. Make a new project folder and open it in VS code.
  4. run the below commands one by one
go mod init MODULE_NAME
go get fyne.io/fyne/v2@latest
go install fyne.io/fyne/v2/cmd/fyne@latest
@LfJohnVo
LfJohnVo / gist:7b8328ea396f6e24f05a50e3a7c3bc02
Last active January 20, 2023 20:49
Add ssl certificate to nginx in docker
Step 01: Open ports
Open the docker-compose file (docker-compose.yml) and find Nginx image configurations. add SSL secure ports.
Note 1: Also you need to know, HTTP listen from PORT:80 and HTTP(s) listen from 443
Note 2: If you are using EC2 server to run your docker swarm, make sure that you have enabled HTTPS ports. If not, add a security group by adding HTTPS ports to it.
nginx:
image : your_nginx_image/nginx:latest
@LfJohnVo
LfJohnVo / mysql-docker.sh
Created January 20, 2023 19:45 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
package main
import (
"os"
scp "github.com/bramvdbogaerde/go-scp"
"github.com/bramvdbogaerde/go-scp/auth"
"golang.org/x/crypto/ssh"
)
@LfJohnVo
LfJohnVo / pget.go
Created September 1, 2022 18:59 — forked from montanaflynn/pget.go
Bounded Parallel Get Requests in Golang
package main
import (
"fmt"
"net/http"
"sort"
"time"
)
// a struct to hold the result from each request including an index
@LfJohnVo
LfJohnVo / golang-nuts.go
Created July 12, 2022 20:18 — forked from ryanfitz/golang-nuts.go
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl