Skip to content

Instantly share code, notes, and snippets.

View Cyberistic's full-sized avatar

Cyberistic Cyberistic

View GitHub Profile
@Cyberistic
Cyberistic / README.md
Last active September 18, 2026 22:54
Morph a liquid-glass button to scrollable, size-variable, selectable chips

This is a minimal repro of our current collapsable liquid-glass morph effect. Multiple attempts were made to create the desired effect, all failed to retain the scrollable behavior of the filter chips or were time-based hacks. We reverted to a simple animation where the chips just fade in (what the code does below).

Here is the expected result:

  1. The filter button gets "split" from below into another circle which drops down, we will refer to this circle as the chips circle. The filter icon animates to an X close button.
  2. The chips circle is stretched horizontally (while slightly getting shrunk vertically) until it covers the space required by all the filter chips (so it stretches beyond the screen).
  3. The chips circle gets split into separate chips, each having their own width. Text/icons on those chips start to appear
  4. The chips are now selectable and scrollable.
  5. Pressing on the filter button again reverses the animation and collapses.
@Cyberistic
Cyberistic / show-network-devices.sh
Last active March 16, 2026 08:31
Discover network devices through SSH (to be easily used with zerotier)
#!/bin/bash
# Filename: ~/usr/local/bin/show-network-devices.sh
# LAN Device Viewer (ping sweep + ARP)
# Detect LAN interface and subnet
LAN_IFACE=$(ip route get 1 | awk '{print $5; exit}')
LAN_SUBNET=$(ip -4 addr show "$LAN_IFACE" | awk '/inet /{print $2}')
LAN_SUBNET_PREFIX=$(echo "$LAN_SUBNET" | cut -d/ -f1 | sed 's/\.[0-9]*$//')
@Cyberistic
Cyberistic / prisma-studio-d1.md
Created January 29, 2026 19:09
Embedded Prisma Studio with Cloudflare D1 - workaround for sqlite_master blocking

Embedded Prisma Studio with Cloudflare D1

This guide shows how to embed Prisma Studio in your application with Cloudflare D1 database support.

The Problem

Cloudflare D1's Worker binding blocks introspection queries (sqlite_master, pragma_table_list, pragma_table_xinfo) that Prisma Studio needs to discover your schema. This results in errors like:

Error: not authorized
@Cyberistic
Cyberistic / README.md
Created December 30, 2025 06:39
pgbackweb-coolify

PGBackWeb for Coolify

Deploy PGBackWeb on Coolify and backup multiple PostgreSQL databases to S3-compatible storage buckets. Best for when db is defined in a monorepo docker-compose and coolify cannot auto-detect it.

Quick Start

  1. In Coolify, create a new Service → Docker Compose
  2. Paste the docker-compose.yml content
  3. Deploy - Coolify handles the rest
  4. Under services, find pgbackweb and assign domain, make sure to add port 8085 (eg. pgbackweb.yourdomain.com:8085)
@Cyberistic
Cyberistic / index.js
Created August 19, 2025 05:30
Expo Notifications CloudFlare Worker Relay
/**
* Cloudflare Worker to relay push notifications to Expo
* Acts as a proxy between our server and https://exp.host/--/api/v2/push/send
*/
// Make sure to generate an API_KEY and store it in your worker secrets
const EXPO_PUSH_URL = "https://exp.host/--/api/v2/push/send";
const EXPO_PUSH_TOKEN_URL = "https://exp.host/--/api/v2/push/getExpoPushToken";