This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { AnyProcedure, AnyQueryProcedure, inferProcedureInput } from '@trpc/server' | |
import { trpc, type AppRouter } from './trpc' | |
interface RouterRecord { | |
[key: string]: AnyProcedure | RouterRecord | |
} | |
type getQueryInput<T extends AnyQueryProcedure> = | |
| inferProcedureInput<T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react' | |
import { Card, CardContent, CardFooter, CardHeader } from './card' | |
import { Skeleton } from './skeleton' | |
type AsyncCardChild<T> = ((data: T) => React.ReactNode) | React.ReactNode | |
type AsyncCardProps<T> = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & { | |
promise?: Promise<T> | |
children?: AsyncCardChild<T> | AsyncCardChild<T>[] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script clones a supabase database without the data & owned by the current user | |
# Usage: clone_supabase_db.sh <new_db_name> [supabase_db_port] | |
# | |
# NOTE: [supabase_db_port] is optional and defaults to '54322' | |
# NOTE: You may seem some errors in the console. most of the time they are harmless for the purposes of running a test/shadow db. | |
# As long as you get a new DB with the same schema, you should be good to go. | |
# create a temp file to store the dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script clones a supabase database without the data & owned by the current user | |
# Usage: clone_supabase_db.sh <new_db_name> [supabase_db_port] | |
# | |
# NOTE: [supabase_db_port] is optional and defaults to '54322' | |
# NOTE: You may seem some errors in the console. most of the time they are harmless for the purposes of running a test/shadow db. | |
# As long as you get a new DB with the same schema, you should be good to go. | |
# create a temp file to store the dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony. | |
The following are my contribution signatures: | |
Circuit: semaphore16 | |
Contributor # 90 | |
Hash: 8d8b7d35 01925fca 821b0438 4cb2972f | |
a463bab8 97ab759c 49f0d809 b69914d0 | |
2c6a1635 b10ab8a1 e0fa2693 8dbae44f | |
b70d05a3 ade963ee df5d28d1 d2ed3938 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Add this to the Head section of your super site --> | |
<script> | |
// Say we host our Super site in a subdirectory e.g. https://example.com/blog | |
// We can redirect it properly in Cloudflare Worker, but relative links will break | |
// So we require some custom code to override absolute href paths & history state changes | |
if (window.location.origin === 'https://example.com') { | |
var baseDir = '/blog'; | |
function historyMethodOverride(target, thisArg, argArray) { | |
// prepend baseDir if it isn't there |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/will_paginate.rb | |
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= MaterializeLinkRenderer | |
super.try :html_safe | |
end | |
class MaterializeLinkRenderer < LinkRenderer |