Skip to content

Instantly share code, notes, and snippets.

View praskoson's full-sized avatar
😤
About to start blasting

praskoson

😤
About to start blasting
View GitHub Profile
@praskoson
praskoson / auth.ts
Created April 3, 2024 22:52
Twitter OAuth with Lucia
import { Lucia } from "lucia";
import { NeonHTTPAdapter } from "@lucia-auth/adapter-postgresql";
import { neon } from "@neondatabase/serverless";
import { Twitter } from "arctic";
import { cache } from "react";
import { cookies } from "next/headers";
import { env } from "@/env.mjs";
import type { Session, User } from "lucia";
Vite/React/TS/Tailwind/Vitest
https://github.com/joaopaulomoraes/reactjs-vite-tailwindcss-boilerplate
@praskoson
praskoson / select.tsx
Created March 19, 2023 20:26
Reusable Select Component using Headless-UI & Tailwind
import {
Transition,
Listbox,
type ListboxProps,
type ListboxOptionsProps,
type ListboxOptionProps,
} from "@headlessui/react";
import clsx from "clsx";
import React from "react";
import { twMerge } from "tailwind-merge";
@praskoson
praskoson / namespaced.ts
Last active March 15, 2023 13:37
Namespaced Components
// source: https://react-typescript-cheatsheet.netlify.app/docs/advanced/misc_concerns
import { forwardRef } from "react";
const Input = (props: any) => <input {...props} />;
const Form = forwardRef<HTMLDivElement, any>(
({ children, ...otherProps }, ref) => (
<form {...otherProps} ref={ref}>
{children}
@praskoson
praskoson / mint_blank_nfts.sh
Last active January 28, 2023 14:02
Bash script for sequentially minting Solana NFTs. Uses metaboss, jq and Solana CLI config file.
#!/bin/sh
USAGE="Usage: ./mint-blank-nfts {amount} [metadata URL]\n\nDependencies: \nmetaboss ^0.14.0 (https://crates.io/crates/metaboss)\nSolana CLI key file (~/.config/solana/id.json)\njq (https://stedolan.github.io/jq/)"
if [ $# == 0 ]; then
echo -e $USAGE
exit 1;
fi
if [ ! -f ~/.config/solana/id.json ]; then
@praskoson
praskoson / Verify
Created May 11, 2022 19:12
Galaxy ID
Verify Github on Galaxy. gid:8wPBVau8HNsLVcwejNoaBb