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
// app > api > webhook > stripe > js route.js --> | |
import { NextResponse } from 'next/server'; | |
import { headers } from 'next/headers'; | |
import Stripe from 'stripe'; | |
import connectMongo from '@/libs/mongoose'; | |
import User from '@models/User'; | |
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); | |
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET; |
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/bash | |
# Script to update a firewall rule in a Hetzner Firewall with your current IP address. | |
# Good if you would like to restrict SSH access only for your current IP address (secure). | |
################# | |
# WARNING: This script will overwrite all rules in the firewall rules, so make sure you | |
# added all the required rules. | |
# I use a separate firewall rule just for SSH access. | |
################# |
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 { PropsWithChildren, useEffect, useState } from "react"; | |
import { Container } from "~/components/container"; | |
import { ArrowLeft, ArrowRight } from "lucide-react"; | |
import { range } from "~/utils/range"; | |
const IMAGES = [ | |
{ | |
id: 1, | |
url: "https://images.pexels.com/photos/1366919/pexels-photo-1366919.jpeg", | |
}, |
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 TelegramBot from "node-telegram-bot-api"; | |
//TODO: Add a way to track events in a database right now I'm lazy. | |
export interface TelegramEventTrackerConfig { | |
botToken: string; | |
chatId: string; | |
} | |
type PrimitiveType = string | number | boolean; |
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 os | |
import tweepy | |
import time | |
#setting up twitter API authentication | |
consumer_key = 'xxx' | |
consumer_secret = 'xxx' | |
access_token = 'xxx' | |
access_token_secret = 'xxx' |
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
ngrok http port# -host-header="localhost:port#" |