Skip to content

Instantly share code, notes, and snippets.

@Yiork
Yiork / vercel.md
Created June 1, 2025 07:35 — forked from ky28059/vercel.md
Deploying to Vercel from an organization for free using GitHub actions

This gist was partially inspired by this blog about Next.js Vercel CI with GitHub actions.

The problem

An easy way to deploy and host websites for free is to use GitHub pages. If you've deployed a Next.js project to GitHub pages, you may have used a GitHub action similar to this in the past to automatically redeploy the site when a new commit is pushed:

# gh-pages-merge.yml
name: Deploy to gh-pages on merge
on:
  push:
@Yiork
Yiork / GLSL-Noise.md
Created August 24, 2024 19:33 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@Yiork
Yiork / tokio_spawn.rs
Created May 31, 2024 22:26 — forked from fancellu/tokio_spawn.rs
Rust example of tokio::spawn and JoinHandle processing
async fn hello(name: &str) -> String {
// pretend to be doing some work
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
format!("Hello {}", name)
}
fn blocking() -> String {
println!("Blocking");
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::{Manager, Window};
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
@Yiork
Yiork / useFirestorePaginationSSR.ts
Last active September 21, 2023 13:08
firebase pagination hook typescript
import { useCallback, useMemo, useState } from "react";
import {
CollectionReference,
getDocs,
limit,
orderBy,
OrderByDirection,
query as q,
startAfter,
} from "@firebase/firestore";
@Yiork
Yiork / OTPInput.tsx
Created April 22, 2023 11:17 — forked from schriker/OTPInput.tsx
Simple React Native One Time Password Input
import React, { useRef } from 'react'
import { NativeSyntheticEvent, TextInput, TextInputKeyPressEventData, View } from 'react-native'
import { useStyles } from 'lib/hooks'
import { createStyles } from 'lib/styles'
import { Nullable } from 'lib/types'
type OTPInputProps = {
length: number,
value: Array<string>,
disabled: boolean,