Skip to content

Instantly share code, notes, and snippets.

View jongan69's full-sized avatar
🎯
WEB3D

Jongan69 jongan69

🎯
WEB3D
View GitHub Profile
@jongan69
jongan69 / cleanup.sh
Created July 25, 2025 19:50
clean up on mac
#!/bin/bash
echo "🔧 Starting Mac dev cleanup..."
# 1. Clear User & System Cache
echo "🧹 Clearing system and user caches..."
sudo rm -rf ~/Library/Caches/* /Library/Caches/*
# 2. Xcode Derived Data
echo "🧹 Removing Xcode Derived Data..."
@devnamipress
devnamipress / expo-rules.md
Last active September 2, 2025 04:03
cursor-rules-expo-react-native

Cursor Rules for Expo and React Native Projects

This document outlines the standardized rules and guidelines for developing mobile applications using Expo and React Native. These rules are designed to ensure consistency, maintainability, performance, accessibility, and error-free development across all projects. They apply to all Expo-based React Native apps and are crafted to minimize troubleshooting efforts and enforce best practices.

Cursor Adherence

  • Mandatory Compliance: Cursor must read and strictly follow all rules in this document for every Expo and React Native project.
  • Self-Check: Before generating code or modifying a project, Cursor must verify that its actions align with these guidelines.
  • Error Prevention: If Cursor detects a potential violation of these rules (e.g., creating a new project inside an existing one), it must halt and prompt the user for clarification instead of proceeding.
  • Documentation Reference: Cursor must reference this document (cursor-rules.md) w
@t3dotgg
t3dotgg / try-catch.ts
Last active December 25, 2025 02:05
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@jongan69
jongan69 / .env
Last active October 30, 2024 01:07
Lockin Bot??? RSI??? someone plz shoot me
OX_API_KEY=
OX_API_SECRET=
{
"version": "0.1.0",
"name": "pump",
"instructions": [
{
"name": "initialize",
"docs": [
"Creates the global state."
],
"accounts": [
@jongan69
jongan69 / decryptionFunctions.js
Last active May 29, 2024 23:36
Runemilio Jazz
// Function to pad a given key to a length of 32 bytes using the CryptoJS library
function padKey(e) {
// Convert the input string 'e' to a UTF-8 encoded WordArray
let t = CryptoJS.enc.Utf8.parse(e);
// Create an empty WordArray to store the padded key
let n = CryptoJS.lib.WordArray.create();
// Concatenate the UTF-8 encoded WordArray 't' to 'n'
n.concat(t);
@zhe-t
zhe-t / sendTxWithJito.ts
Last active November 17, 2025 21:45
Smart send a transaction using Jito dedicated endpoint
import { Connection, SendOptions } from '@solana/web3.js';
export type JitoRegion = 'mainnet' | 'amsterdam' | 'frankfurt' | 'ny' | 'tokyo';
export const JitoEndpoints = {
mainnet: 'https://mainnet.block-engine.jito.wtf/api/v1/transactions',
amsterdam: 'https://amsterdam.mainnet.block-engine.jito.wtf/api/v1/transactions',
frankfurt: 'https://frankfurt.mainnet.block-engine.jito.wtf/api/v1/transactions',
ny: 'https://ny.mainnet.block-engine.jito.wtf/api/v1/transactions',
tokyo: 'https://tokyo.mainnet.block-engine.jito.wtf/api/v1/transactions',
};
export function getJitoEndpoint(region: JitoRegion) {
@jongan69
jongan69 / Readme.md
Created January 30, 2023 05:22
A smart contract for managing todo tasks

TaskContract

A smart contract for a Todo App on the Ethereum blockchain.

Overview

TaskContract is a smart contract for a Todo App on the Ethereum blockchain. It allows users to add tasks and delete tasks. It also allows users to view their own tasks.

Functions

TaskContract has the following functions:

  • addTask(string memory taskText, bool isDeleted) - adds a new task to the contract.
@jongan69
jongan69 / Readme.md
Last active January 30, 2023 05:01
A Custom React Hook using Ref Pattern

useTimeout

A custom React Hook that allows you to call a callback after a specified delay.

Usage

import { useTimeout } from './useTimeout';

const callback = () =&gt; {
@jongan69
jongan69 / Blink.js
Last active January 30, 2023 05:57
GPIO Node interfacing