Skip to content

Instantly share code, notes, and snippets.

View ivancorrales's full-sized avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
package main
import (
"fmt"
"syscall/js"
"time"
)
func main() {
currentTime := time.Now().Format("2006-01-02 15:04:05")
<div class="center">
<h1>Webassembly tutorial<h1>
<h2 id="description"></h2>
</div>
<script>
loadWasm("pos-tagging-service.sample1.wasm")
.then((wasm) => {
console.log("main.wasm is loaded 👋");
})
.catch((error) => {
console.log("ouch", error);
});
</script>
@ivancorrales
ivancorrales / main.go
Created April 28, 2022 16:40
WASM - Sample1
package main
func main() {
println("Hello my friend!")
}
@ivancorrales
ivancorrales / bubblesort.go
Last active April 13, 2022 02:36
bubble sort implementation
package main
import "fmt"
func bubbleSort[T int32 | float32](input []T) []T {
swapped := true
for swapped {
swapped = false
for i := 0; i < len(input)-1; i++ {
if input[i] > input[i+1] {
@ivancorrales
ivancorrales / main.go
Last active April 12, 2022 18:19
Go generics: any
package main
import (
"fmt"
"reflect"
)
func echo[T any](v T) {
fmt.Printf("%v (%s)\n", v, reflect.TypeOf(v))
}
@ivancorrales
ivancorrales / raspberry-pi-plex-server.md
Created November 29, 2021 20:09 — forked from jc-torresp/raspberry-pi-plex-server.md
Setup a Raspberry Pi Plex Media Server (Including external storage media and Windows to Raspbian migration)

Raspberry Pi Plex Server

Installation

Ensure our operating system is entirely up to date:

sudo apt-get update
sudo apt-get upgrade
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(define
(problem waiter-service)
(:domain restaurant)
; objects with types
(:objects
w1 w2 w3 - waiter
g1 g2 g3 g4 g5 g6 g7 g8 - group
t1 t2 t3 t4 t5 - table
)
(define
(problem waiter-service)
(:domain restaurant)
; objects with types
(:objects
w1 w2 - waiter
g1 g2 - group
t1 t2 - table
)