Skip to content

Instantly share code, notes, and snippets.

View sojinsamuel's full-sized avatar
👨‍💻
Working Remotely

Sojin Samuel sojinsamuel

👨‍💻
Working Remotely
View GitHub Profile
// Part 1
import OAuth from "oauth-1.0a";
import crypto from "crypto";
import got from "got";
import { config } from "dotenv";
config();
const apiKey = process.env.TWITTER_API_KEY;
const apiKeySecret = process.env.TWITTER_API_KEY_SECRET;
import { config } from "dotenv";
import TelegramBot from "node-telegram-bot-api";
import getTwitterVideoURL from "./twitterfunction.js";
config();
const token = process.env.TELEGRAM_BOT_TOKEN;
// console.log(token);
const bot = new TelegramBot(token, { polling: true });
@sojinsamuel
sojinsamuel / route.ts
Created November 14, 2023 12:29
Stripe webhook Nextjs api route code
import Stripe from "stripe";
import { headers } from "next/headers";
import { NextResponse } from "next/server";
import { db } from "@/db";
export async function POST(req: Request) {
const body = await req.text();
const signature = headers().get("Stripe-Signature") as string;
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
<p>Welcome to Showwcase</p>
<style>
p::first-letter {
color: green;
font-size: 34px;
font-weight: bold;
}
</style>