Skip to content

Instantly share code, notes, and snippets.

// Copyright (C) 2020 Alessandro Segala (ItalyPaleAle)
// License: MIT
// MyGoFunc returns a Go time.Time to JavaScript
func MyGoFunc() js.Func {
return js.FuncOf(func(this js.Value, args []js.Value) interface{} {
// Get the current time as a Go time.Time object
now := time.Now()
// Get the Date object constructor from JavaScript
dateConstructor := js.Global().Get("Date")
// Copyright (C) 2020 Alessandro Segala (ItalyPaleAle)
// License: MIT
package main
// Import the package to access the Wasm environment
import (
"syscall/js"
)
@ItalyPaleAle
ItalyPaleAle / build-dapr.sh
Last active July 31, 2023 23:51
build-dapr.sh
#!/bin/bash
set -e
DIR=$(dirname "$BASH_SOURCE")
echo "Getting into directory ${DIR}/dapr"
cd "${DIR}/dapr"
#DEBUG=1 make build
CGO_ENABLED=0 \
@ItalyPaleAle
ItalyPaleAle / components---localstorage.yaml
Last active December 21, 2022 01:28
Subtle Crypto test app
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: jwks
spec:
type: crypto.localstorage
version: v1
metadata:
- name: path
value: keys