Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
package main
import (
"log"
"time"
nats "github.com/nats-io/nats.go"
)
type Msg struct {
<html>
<style>
@font-face {
font-family: Somatic;
src: url("./Somatic-Rounded.otf") format("opentype");
}
body {
margin: 0px;
}
[
{
"prompt": "As a consumer, I want to be able to reduce my carbon footprint."
},
{
"prompt": "As a business, I want a better way to optimize resources so that I can switch to a four day work week."
},
{
"prompt": "As an artist, I want a better way to sell my art to interested individuals."
},
[
{
"name": "Warrior",
"sprite": {
"spritesheet": "warrior_sprites.png",
"height": "46px",
"width": "46px",
"x": "-92",
"y": "-92"
},
// Take a full screenshot of the page and override the viewport to match the required card dimensions
func fullScreenshot(urlstr string, quality int64, res *[]byte) chromedp.Tasks {
return chromedp.Tasks{
chromedp.Navigate(urlstr),
chromedp.ActionFunc(func(ctx context.Context) error {
err := emulation.SetDeviceMetricsOverride(597, 1122, 0, false).
WithScreenOrientation(&emulation.ScreenOrientation{
Type: emulation.OrientationTypePortraitPrimary,
Angle: 0,
}).
func main() {
// Open the cards file
inputFile, err := os.Open("cards.json")
if err != nil {
fmt.Println(err)
}
defer inputFile.Close()
// Read the cards file into bytes
<script>
import { isAuthenticated } from "../../store.js";
let isVisible = false;
document.addEventListener("click", function () {
isVisible = false;
});
function setVisible(event) {
<script>
import {onMount} from 'svelte'
let name = 'world';
let foo;
let cssClass = "test"
onMount(()=>{
foo.addEventListener('click', function(){