Skip to content

Instantly share code, notes, and snippets.

View Desttro's full-sized avatar

Desttro

  • Czech Republic
View GitHub Profile
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@RobSchilderr
RobSchilderr / .cursorrules
Last active October 18, 2025 17:34
Tamagui Takeout .cursorrules
# Takeout Cursor Rules
You are an expert in cross-platform development with React Native, Expo, TypeScript, React, PostgreSQL, Tamagui, Expo Router, tRPC, Solito, Supabase, and more. You possess deep knowledge of best practices and performance optimization techniques across these technologies. Our codebase is a shared Turborepo called "Takeout".
• Prompt Context:
1. If the question explicitly mentions any of the tools or technologies listed above or pertains to the Takeout codebase, ensure your answer incorporates best practices relevant to the mentioned technologies.
2. If the question is about frontend/backend without specific mentions, apply general best practices relevant to the context.
3. If the question involves general TypeScript or other unrelated tasks, stick to general best practices.
4. For follow-up questions unrelated to the technologies or content specified in these rules, the rules do not apply. Focus on answering the question without considering the specified best practices unless explicit
import { Hono } from 'hono'
import { Suspense } from 'hono/jsx'
import { jsxRenderer } from 'hono/jsx-renderer'
const app = new Hono()
app.get(
'*',
jsxRenderer(
({ children }) => {
@w00kie
w00kie / index.ts
Last active October 30, 2025 02:11
Cloudflare Worker that bundles R2 objects in a Zip file
import { z } from 'zod';
import { ZipWriter, BlobReader, configure } from '@zip.js/zip.js';
// Without this, we get uncaught error due to Workers runtime bug
// See: https://github.com/gildas-lormeau/zip.js/discussions/514
configure({
useCompressionStream: false,
});
// Payload schema that lists the files to be bundled, their filenames and the archive filename
@shirakaba
shirakaba / Getting Biome to behave in a monorepo.md
Last active May 19, 2025 14:12
Getting Biome to behave in a monorepo

How to get Biome to behave in a monorepo

At the time of writing, namely v1.8.3, Biome does not fully support monorepos yet, but you can wrestle it into working.

Below, we have a typical monorepo (with the changes we're about to make marked in green). It has some workspaces under apps and packages, and at each level of the repo, there are a mixture of files we want to format or ignore.

  .
  ├── .gitignore
+ ├── .vscode
@natew
natew / AnimatedNumbers.tsx
Last active March 8, 2024 00:27
AnimatePresence number ticker
const AnimatedNumbers = () => {
const [numbers, setNumbers] = useState(100_000)
const len = `${numbers}`.length
return (
<YStack gap="$5">
<XStack gap="$2">
<Button
onPress={() => {
@nderscore
nderscore / TamaguiZeego.tsx
Last active May 17, 2025 04:55
Example of how to wrap Zeego's components with Tamagui styles
import { FC } from 'react';
/**
* Utilities to make Typescript happy wrapping Zeego components with Tamagui's
* styled() components. These utils do nothing except assign Typescript types.
*
* Makes the following props optional and of `unknown` type:
* - children
* - key
*
@MyKEms
MyKEms / simplelogin_bulk_alias_creation.sh
Created November 14, 2023 08:46
SimpleLogin.io Bulk Email Alias Creation Script
# Documentation: https://github.com/simple-login/app/blob/master/docs/api.md#post-apiv3aliascustomnew
# This script facilitates the bulk creation of email aliases on SimpleLogin.io by automating the API calls needed for each alias. It ensures compliance with rate limits and handles the retrieval of domain-specific signed_suffixes for each alias creation request.
# Author: https://github.com/MyKEms
#!/bin/bash
# Adjust variables
api_key="API_TOKEN"
domain="contoso.com"
@EvanBacon
EvanBacon / dismiss-completed-gh-notifications.js
Last active July 15, 2023 05:08
Select and dismiss GH notifications for merged and closed issues/PRs. https://twitter.com/Baconbrix/status/1679925775162548224?s=20
[...document.querySelectorAll('.notifications-list-item:has(.octicon-git-merge)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-skip)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-issue-closed)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-discussion-closed)'), ...document.querySelectorAll('.notifications-list-item:has(.octicon-git-pull-request-closed)')].forEach(el => el.querySelector('input').click()); setTimeout(() => document.querySelector('button[type="submit"][role="menuitem"][title="Done"].btn').click(), 200)
@shirakaba
shirakaba / Creating an Expo app in 2023.md
Created July 12, 2023 08:08
Creating an Expo app in 2023

Creating an Expo app in 2023

12th July, 2023. I'm going to try creating an iOS app called Paranovel, using Expo. My environment for mobile app dev (Xcode, Ruby, etc.) should be in reasonably good shape already as I frequently develop with React Native and NativeScript.

Creating the app

Go to https://docs.expo.dev, and see the Quick Start: npx create-expo-app paranovel

This runs with no problem, then I get this macOS system popup: