Skip to content

Instantly share code, notes, and snippets.

@nmabhinandan
nmabhinandan / datastar.ts
Created March 10, 2025 05:40
Datastar SDK implementation for Hono
import { ServerSentEventGenerator as AbstractSSEGenerator } from '@starfederation/datastar-sdk/src/abstractServerSentEventGenerator'
import type { DatastarEventOptions, EventType, MergeFragmentsOptions } from '@starfederation/datastar-sdk/src/types'
import type { Context } from 'hono'
import type { JSX } from 'hono/jsx/jsx-runtime'
import type { SSEStreamingApi } from 'hono/streaming'
import { streamSSE } from 'hono/streaming'
import type { Jsonifiable } from 'type-fest'
export function isRecord(obj: unknown): obj is Record<string, Jsonifiable> {
return typeof obj === 'object' && obj !== null
@phortuin
phortuin / signing-git-commits.md
Last active November 3, 2025 09:37
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@agrcrobles
agrcrobles / android_instructions_29.md
Last active February 15, 2025 21:03 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?