Skip to content

Instantly share code, notes, and snippets.

View vanleantking's full-sized avatar
🤣

Le Van vanleantking

🤣
  • U
  • Binh Thanh
View GitHub Profile
@vanleantking
vanleantking / country code vs iso code
Created September 29, 2022 06:44
country code vs iso code
[
{
"countryName": "Afghanistan",
"countryCode": "93",
"isoCode": "AF / AFG"
},
{
"countryName": "Albania",
"countryCode": "355",
"isoCode": "AL / ALB"
@vanleantking
vanleantking / chromedp add flag
Created September 7, 2022 03:05
chromedp add flag
allocCtx, cancel := chromedp.NewExecAllocator(context.Background(), []chromedp.ExecAllocatorOption{
chromedp.NoFirstRun,
chromedp.NoDefaultBrowserCheck,
chromedp.DisableGPU,
chromedp.UserDataDir(dir),
chromedp.NoSandbox,
//chromedp.Headless,
// After Puppeteer's default behavior.
@vanleantking
vanleantking / slice golang
Created August 31, 2022 11:18
slice golang
// You can edit this code!
// Click here and start typing.
package main
import (
"fmt"
)
func main() {
ar := []string{"a", "b", "c", "d", "e", "f", "g", "h", "t"}
@vanleantking
vanleantking / add sub into video
Created August 25, 2022 16:49
add sub into video
https://stackoverflow.com/questions/17623676/text-on-video-ffmpeg
@vanleantking
vanleantking / recover mysql from upgrade 5.7 into 8.1 on DB can not initialized
Created August 1, 2022 07:59
recover mysql from upgrade 5.7 into 8.1 on DB can not initialized
1. delete log file from
https://stackoverflow.com/questions/49922023/mysql-8-0-unsupported-redo-log-format
@vanleantking
vanleantking / recover panic function
Created July 28, 2022 03:39
recover panic function
package main
import "fmt"
func main() {
x := 20
y := 0
printAllOperations(x, y)
fmt.Println("Exiting main without any issues")
}
@vanleantking
vanleantking / regexp domain web in string
Created July 26, 2022 04:11
regexp domain web in string
([\w+]+\:\/\/)?([\w\d-]+\.)*[\w-]+[\.\:]\w+([\/\?\=\&\#\.]?[\w-]+)*\/?
@vanleantking
vanleantking / config timezone ubuntu
Created July 25, 2022 03:54
config timezone ubuntu
https://linuxize.com/post/how-to-set-or-change-timezone-on-ubuntu-18-04/
@vanleantking
vanleantking / ffmpeg processing with gpu process
Created July 19, 2022 16:12
ffmpeg processing with gpu process
1. install nvidia driver:
- https://askubuntu.com/questions/670485/how-to-inspect-the-currently-used-nvidia-driver-version-and-switch-it-to-another
- https://www.cyberciti.biz/faq/ubuntu-linux-install-nvidia-driver-latest-proprietary-driver/
1. install ffmpeg with nvidia driver: https://www.cyberciti.biz/faq/how-to-install-ffmpeg-with-nvidia-gpu-acceleration-on-linux/
@vanleantking
vanleantking / remove trial key version navicat ubuntu version
Created June 13, 2022 02:47
remove trial key version navicat ubuntu version
If you don't want to activate and just want to reset the trial,
please delete the
~/.config/dconf/user files and the
~/.config/navicat folder.
Pay attention to the backup data. If conditions permit, please support genuine.