Skip to content

Instantly share code, notes, and snippets.

View slvssb's full-sized avatar
🚀
building @geckomed

Selva slvssb

🚀
building @geckomed
View GitHub Profile
@slvssb
slvssb / gist:7a3682999f6efc2afe6b1a62f05063c2
Created November 6, 2024 10:01 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
.monaco-workbench
.part.editor
> .content
.editor-group-container
> .editor-group-watermark
> .letterpress {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABpIAAAQDCAMAAABTZUgKAAAC61BMVEUAAADq9/zq9fzt9vvx9Pnv8/jo9fvs+//r8fbu+//j7Pfl7/fj7vfj+f/l+v/o8fnt/P/w9Prk7/fi+f/n+v/g+P/i7fbg7Pbo/P/h+//98vDo+P/77fn/8+X/8uPk+//35f/h9f//8uH34//k9v//7eD79Ok8mdQjictP5f8IeLpp5f9PzP/LT///uE9P6v9Psf//tE8AAAD/XQBPs/9W5/+tz+nS4/Kd8P+q8v/J9//C9v+WweO61ezM4fFAm9YSe7xp6f/W+f9c6P9i6f8qjMxx5/87ks7c6fTb+v+00uoyjs3P+P+x8/+k8f+F7P/Y5vOmx+ORveGQ7v/D7f9az/+49P+K7f9Vzv+fxeR21/9N4f3I3/CmzemsyeMkgb8afr1MmdHA1+xt1P/D3fDU8f/V5vRJn9drqdiX7v++2u+99f9SndLM8P/e7PZbp9p56P9Endam5P9g0f9m0v9Els9jq9suhsF0rdpx6/+W3/98sdxVpNmeyuiu5v+G2/+O3f9PotjI2+3P3+2JuN//vl+e4v9ZoNOgwd6DtN280+e76v9lptaXxuaAuOBQk8d57P9BjMM4iMF/2f//zIGEvOK0zeR2s91fo9XZ8/+16f+LveJZmMlvst//xG/e9P9/7f/OWf9nrt1/6f94t+FjncuTudlIzvJFxOyZvNttrttK2Pj/05P/69DY6vb/3q9soc7P5vT/79uMw+Zfuf/RYv/F2OpzptBCu+d5qdL/5ce01+7/4ryNtdjUbf9Ij8X/2KD/bBdwwP/Xd/+IstaV8f8+o9n13P+Ax/
@slvssb
slvssb / .prettierrc
Last active February 24, 2024 13:34
My Prettier Configuration
{
"arrowParens": "avoid",
"endOfLine": "lf",
"plugins": [],
"printWidth": 100,
"quoteProps": "as-needed",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
const { getDefaultConfig } = require("expo/metro-config")
const path = require("path")
// Find the project and workspace directories
const projectRoot = __dirname
// This can be replaced with `find-yarn-workspace-root`
const workspaceRoot = path.resolve(projectRoot, "../..")
const config = getDefaultConfig(projectRoot)
import NetInfo from "@react-native-community/netinfo"
import {
QueryClient,
QueryClientProvider,
focusManager,
onlineManager,
} from "@tanstack/react-query"
import { useEffect } from "react"
import { AppState, Platform, type AppStateStatus } from "react-native"
import AsyncStorage from "@react-native-async-storage/async-storage"
import { hc, type AppType } from "api"
import * as configs from "~/configs/keys"
export const rpcClient = hc<AppType>(process.env.EXPO_PUBLIC_API_URL, {
async fetch(input, requestInit, _Env, _executionCtx) {
const token = await AsyncStorage.getItem(configs.API_KEY_STORAGE)
const headers = new Headers(requestInit?.headers)
headers.append("Authorization", `Bearer ${token}`)
const requestInitExtended = Object.assign(requestInit ?? {}, { headers })
interface EnvSchemaType {
EXPO_PUBLIC_ENV_VAR: string
}
declare module "process" {
global {
namespace NodeJS {
interface ProcessEnv extends EnvSchemaType {}
}
}
@slvssb
slvssb / combine-classnames.ts
Created January 13, 2024 10:49
Merges tailwind classnames
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
@slvssb
slvssb / upgrade-deps.js
Created August 16, 2023 16:35
Upgrade package.json dependencies to the latest
import fs from 'node:fs/promises'
import path from 'path'
fs.readFile(path.resolve(process.cwd(), 'package.json'), { encoding: 'utf-8' })
.then(packageJsonString => {
const packageJson = JSON.parse(packageJsonString)
const prodDeps = Object.keys(packageJson.dependencies)
const devDeps = Object.keys(packageJson.devDependencies)
console.log('\n---------------------------------------------------------------')