Skip to content

Instantly share code, notes, and snippets.

@freshteapot
freshteapot / notes.md
Last active April 30, 2025 22:15
Continuing to play with AI

The prompt

Using

AlistItemV2:
      type: object
      required:
        - from
        - to
@freshteapot
freshteapot / gist:79458efeb096102d851419376548212f
Created April 3, 2025 09:22
habit tracker vs habit builder vs habit log

The terms "habit tracker," "habit builder," and "habit log" are often used interchangeably, but they have subtle differences depending on how they are used in habit-building routines.

  1. Habit Tracker:

    • Purpose: A habit tracker is a tool (usually in the form of a chart, app, or calendar) designed to track your progress over time. The main goal is to visually represent how often you perform a certain habit, helping you stay accountable.
    • Features: Often includes a simple system where you mark off each day you complete the habit, making it easy to see streaks and progress.
    • Example: If you're trying to exercise every day, you might mark an "X" on a calendar every time you work out.
  2. Habit Builder:

    • Purpose: A habit builder is a tool or system focused on helping you form a new habit. It's typically used during the process of developing the habit and might include reminders, small achievable goals, or strategies to help you build consistency.
  • Features: This mig
@freshteapot
freshteapot / a_tst.go
Last active February 15, 2025 19:31
Example of testing
package kv_test
import (
_ "embed"
"github.com/freshteapot/learnalist-api/server/pkg/kv"
"github.com/freshteapot/learnalist-api/server/pkg/testutils"
"github.com/freshteapot/learnalist-api/server/pkg/utils"
"github.com/nats-io/nats.go"
@freshteapot
freshteapot / note.md
Created September 17, 2024 20:01 — forked from freshteapot-rm/note.md
Convert mov to mp4 without audio

Convert mov to mp4 without audio

export convert="XXX.mov"
ffmpeg -i $convert -vcodec h264 -an ${convert%.mov}.mp4
        - $ref: '#/components/schemas/ResponseBase'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/EmbeddingResponseData'
@freshteapot
freshteapot / 1-notes.md
Last active March 20, 2024 06:22
Adding new words to learn in Norwegian via photos from instagram on a mac

Adding new words to learn in Norwegian via photos from instagram on a mac

Save

Use Preview to copy the text out of the image

const a = `A sette
To put
A skrelle
To peel
A steke
@freshteapot
freshteapot / settings.md
Last active February 20, 2024 07:25
Using ginkgo / gomega, different ways to test what was passed to an interface

VScode / Vscodium options to make go look pretty when testing packages

{
    "go.coverageDecorator": {
        "type": "highlight",
        "coveredBorderColor": "rgba(64,128,128,0.8)",
        "coveredHighlightColor": "rgba(64,128,128,0.8)",
        "uncoveredHighlightColor": "rgba(128,64,64,0.5)",
 "uncoveredGutterStyle": "verticalred"
@freshteapot
freshteapot / note.md
Created January 14, 2024 09:32
= and LIKE do not use the same index

Today I learnt that using equals = does not use the same index as LIKE in sqlite

LIKE and = do not use the same indexes

Indexes

First one via ".expert in sqlite3 cli" <3

CREATE INDEX acl_simple_idx_0a4b252f ON acl_simple(access COLLATE NOCASE);

How to make vscode and ginkgo play nice on focused tests

"go.testEnvVars": {
        "GINKGO_EDITOR_INTEGRATION": true,
    },

Reference