Skip to content

Instantly share code, notes, and snippets.

package examples
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strconv"
"time"
router.Route("/api", func(apiRouter chi.Router) {
apiRouter.Route("/todos", func(todosRouter chi.Router) {
todosRouter.Get("/", func(w http.ResponseWriter, r *http.Request) {
sessionID, mvc, err := mvcSession(w, r)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
package site
import (
"fmt"
"github.com/dustin/go-humanize"
build "github.com/starfederation/datastar/build"
datastar "github.com/starfederation/datastar/sdk/go"
)
templ Home() {
package examples
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strconv"
"time"
<template
data-rocket-ds-password-strength
data-props-password="string|=">
<script data-static>
const requirements = [
{ label: '8+ characters', check: (pwd) => pwd.length >= 8 },
{ label: '12+ characters', check: (pwd) => pwd.length >= 12 },
{ label: 'Lowercase letter', check: (pwd) => /[a-z]/.test(pwd) },
{ label: 'Uppercase letter', check: (pwd) => /[A-Z]/.test(pwd) },
{ label: 'Number', check: (pwd) => /\d/.test(pwd) },
@delaneyj
delaneyj / takehome.md
Last active June 30, 2025 20:32
take home test

Audio Game Programmer Take Home - Synthesizer Project

This is a C++ synthesizer project built with FMOD for audio processing. It includes a command-line interface for controlling various synthesizer parameters.

Project Structure

takehome/
├── src/               # Source code
├── tests/             # Unit tests with mocks
package examples
import (
"github.com/XANi/loremipsum"
"github.com/go-chi/chi/v5"
. "github.com/starfederation/datastar-dev/site/shared"
datastar "github.com/starfederation/datastar/sdk/go"
"math/rand/v2"
"net/http"
"time"
@delaneyj
delaneyj / errors
Last active November 4, 2024 03:11
[{
"message": "Argument of type 'Node | Element | null | undefined' is not assignable to parameter of type 'Node | Element | null'.\n Type 'undefined' is not assignable to type 'Node | Element | null'.",
"startLineNumber": 193,
"startColumn": 52,
"endLineNumber": 193,
"endColumn": 63
},{
"message": "Type 'boolean | undefined' is not assignable to type 'boolean'.\n Type 'undefined' is not assignable to type 'boolean'.",
"startLineNumber": 211,
"startColumn": 5,
export const ceil = Math.ceil
export const floor = Math.floor
export const pow = Math.pow
export const sqrt = Math.sqrt
export const sin = Math.sin
export const sinh = Math.sinh
export const asinh = Math.asinh
export const asin = Math.asin
export const cos = Math.cos
export const acos = Math.acos
package utils
import (
"context"
"golang.org/x/sync/errgroup"
)
type ErrGroupSharedCtx struct {
eg *errgroup.Group