Skip to content

Instantly share code, notes, and snippets.

View feliche93's full-sized avatar

Felix Vemmer feliche93

View GitHub Profile
@ilkou
ilkou / shadcn-ui react-select.jsx
Created March 26, 2024 13:54
react-select with shadcn/ui
/* ----------- simple-select.js ----------- */
import * as React from 'react';
import Select from 'react-select';
import type { Props } from 'react-select';
import { defaultClassNames, defaultStyles } from './helper';
import {
ClearIndicator,
DropdownIndicator,
MultiValueRemove,
Option
@perkinsjr
perkinsjr / middleware.ts
Last active August 7, 2024 11:04
Using Clerk with Upstash for Middleware rate limiting and API Protection
import { getAuth, withClerkMiddleware } from "@clerk/nextjs/server";
import { NextResponse, NextFetchEvent } from "next/server";
import type { NextRequest } from "next/server";
import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";
// Add public paths for Clerk to handle.
const publicPaths = ["/", "/sign-in*", "/sign-up*", "/api/blocked"];
// set your rate limit.
@frankie567
frankie567 / interactive_google_oauth2.py
Last active July 29, 2023 22:07
Interactive Google OAuth2 flow with Streamlit
import asyncio
import streamlit as st
from httpx_oauth.clients.google import GoogleOAuth2
st.title("Google OAuth2 flow")
"## Configuration"
client_id = st.text_input("Client ID")