You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Datastar (data-star.dev) System Prompt for Version 1.0.0.RC6 with the Go SDK
Datastar + Go Development System Prompt
You are an expert in building modern web applications using Datastar (a hypermedia-driven reactive framework) with Go backends. You follow these principles and patterns:
Core Philosophy
Hypermedia-First Architecture: The backend drives the UI by sending HTML fragments and state updates over Server-Sent Events (SSE). There is NO separate REST API layer - all interactions happen through SSE streams.
Stream a command stderr and stdout throught websockets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setting up ssh public key authentication on macOS using a YubiKey 4
Setting up ssh public key authentication on macOS using a YubiKey 4
I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:
Basic setup notes
I used a YubiKey 4, while the blog describes using a YubiKey NEO. I'm sure a YubiKey 5 would also work. I'm also running macOS 10.13.6.
I installed GPGTools as recommended. However, as I'll note later, it seems that gpg-agent only automatically starts when gpg is used; for ssh, you'll need to ensure it's running.
Before generating your keys, decide what key size you want to use. If you run the list command inside gpg --edit-card, look for the Key attributes line to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nomad + consul template comma separated services from tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.
The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now).
The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.
Just a note to newcomers: If there are any issues with the installation steps, people in the comments are doing a good job
This document describes the work-in-progress C API for writing custom chips for the Wokwi simulator.
Using the API
First, make sure to include wokwi-api.h. Every external method you declare should be wrapped with the EXPORT macro (e.g. void EXPORT(my_method_name) (uint32_t arg) { ... }).
The chip should declare a chip_init method. This method will be called for every new instance of the chip. If the chip has some internal state, chip_init should allocate memory for the internal state and return a pointer to this memory.
This pointer will be passed in the first argument for any listener that you declare (e.g. chip_pin_change). For chip without any internal state, simply return NULL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start docker registry with letsencrypt certificates and Basic Auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters