Skip to content

Instantly share code, notes, and snippets.

View afonsolopez's full-sized avatar
🏠
Working from home

Afonso Lopez afonsolopez

🏠
Working from home
View GitHub Profile
@afonsolopez
afonsolopez / go_wasm_example.go
Created June 2, 2022 17:30
Small setup of a Go program, exposing a function to JavaScript
package main
import (
"fmt"
"syscall/js"
)
func main() {
fmt.Println("Hello WASM")
js.Global().Set("runChecker", js.FuncOf(runCheck))

Get youtube video format/quality list

youtube-dl -F '<YOUTUBE_VIDEO_URL>'

Download an specific format/quality trought it ID

youtube-dl -f 136 '<YOUTUBE_VIDEO_URL>'
@afonsolopez
afonsolopez / golang_install_update.sh
Created June 11, 2021 05:08
Script to easily install/update Golang on Ubuntu/Fedora
#!/bin/bash
echo ""
tput setaf 6;
echo "Write the version of Go that you want:"
tput sgr0;
# Asks for the desired golang version to be installed
read goversion