Skip to content

Instantly share code, notes, and snippets.

View dillionverma's full-sized avatar

Dillion Verma dillionverma

View GitHub Profile
@dillionverma
dillionverma / ApplePayButton.tsx
Last active April 14, 2024 06:28
Apple Pay Button - How to make an Apple Pay button using React + NextJS + Typescript + Tailwindcss
// components/ApplePayButton.tsx
import { buttonVariants } from "@/components/ui/button";
import { cn, hasApplePay } from "@/lib/utils";
import { Icons } from "@/components/icons";
import Link from "next/link";
export const ApplePayButton = () =>
hasApplePay() && (
<Link
href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
@dillionverma
dillionverma / schema.prisma
Last active December 11, 2023 19:41
Seed Prisma DB from Stripe
model User {
id String @id @unique @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
name String?
email String? @unique
emailVerified DateTime?
image String?
role Role @default(USER)
#!/usr/bin/env python3
"""
This script is used to backup and restore RocksDB database instances
Example:
$ python3 backup.py backup ./my_live_db ./backup/
$ python3 backup.py restore ./backup ./my_live_db
"""
@dillionverma
dillionverma / S3-Static-Sites.md
Created March 6, 2019 11:09 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

Keybase proof

I hereby claim:

  • I am dillionverma on github.
  • I am dillionverma (https://keybase.io/dillionverma) on keybase.
  • I have a public key whose fingerprint is BF7C 28F8 253F B198 A9E5 0B19 F0A1 A0B7 CDDC 5433

To claim this, I am signing this object:

0xE900c79c25A67B0f31AA5C1Afd84DF51FD702F18
0xE900c79c25A67B0f31AA5C1Afd84DF51FD702F18
@dillionverma
dillionverma / intructions.md
Last active December 4, 2017 02:33
New Developer Macbook Setup

Install iTerm2

Install zsh shell

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Install Brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"