Skip to content

Instantly share code, notes, and snippets.

View chanphiromsok's full-sized avatar
😺
.

Chanphirom Sok chanphiromsok

😺
.
  • Cambodia
  • 12:25 (UTC -12:00)
View GitHub Profile
@ssalbdivad
ssalbdivad / ArkTypeVsZod.md
Last active January 29, 2026 15:52
ArkType/Zod Comparison

Here's a comparison between how the same simple user definition would be defined using ArkType and Zod:

image

ArkType's definition syntax is more concise (definitions are about 50% shorter on average) as well as making it more visually obvious what the inferred TypeScript type will be. The ability to infer TypeScript definitions directly is the same, but ArkType's syntax is again more concise by allowing you to use typeof on a property of arkUser directly instead of using an extra "infer" helper.

In general, we also have taken significant steps to optimize and clarify our type hints when hovering over validators. For example, in the case above, this is what you see when you mouse over "zodUser":

image

@okaybeydanol
okaybeydanol / SwipeableReanimated.tsx
Created February 21, 2025 21:57
RN: Swipeable Item with Reanimated 3 - Lightweight & Performant List Item with Swipe Actions
import React, {
forwardRef,
PropsWithChildren,
useImperativeHandle,
memo,
useMemo,
useCallback,
} from 'react';
import {
Gesture,
const { withAndroidManifest, withDangerousMod } = require("@expo/config-plugins");
const { mergeContents } = require("@expo/config-plugins/build/utils/generateCode");
const fs = require("node:fs");
const path = require("node:path");
/**
* Config plugin to add border radius to Android popup menus
* @param {import('@expo/config-types').ExpoConfig} config - Expo config
* @param {Object} options - Plugin options
* @param {number} [options.radius=14] - Border radius in dp
@tobobo
tobobo / README.md
Last active February 5, 2026 00:27
Using ffmpeg-kit-react-native in a managed Expo project built by EAS

Using ffmpeg-kit-react-native in a managed Expo project built by EAS

This solution is based on @NooruddinLakhani's Medium post Resolved “FFmpegKit” Retirement Issue in React Native: A Complete Guide. I'm not very familiar with iOS and Android build processes but I was able to use LLM tools to implement it as an Expo plugin. Because of this I may not be very helpful in troubleshooting issues, but Claude 4 or Gemini Pro 2.5 may be able to help. Feedback welcome!

This has not been tested for local building—I only build my project on EAS, and this plugin has only been tested for use on EAS.

Prerequisites

  1. You are using Expo 53 (this has not been tested on any other versions)
  2. You are using a managed Expo project which you build with EAS (not locally)
@hardchor
hardchor / README.md
Last active January 10, 2026 22:35
Claude Task Master MCP in Github Copilot (VS Code)

Getting started with Claude Task Master in VS Code with Github Copilot:

  1. Follow the tutorial
    • I'm using pnpm / pnpx instead of npm / npx
    • Use the CLI for init, not the MCP yet
  2. After the initial setup:
    1. Copy all *.instructions.md files to .github/instructions/
    2. Copy the mcp.json file to .vscode/
  3. Launch Copilot Chat with something like Can you analyze the complexity of our tasks? or What tasks are available to work on next?
@byteab
byteab / withBounce.tsx
Last active August 14, 2025 10:16
Achieve apple like spring motions with react native reanimated 3
import { withSpring } from 'react-native-reanimated'
export interface AppleSpringConfig {
duration?: number
bounciness?: number
velocity?: number
overshootClamping?: boolean
restSpeedThreshold?: number
restDisplacementThreshold?: number
}