Hi there 👋

I am an experienced software developer proficient in designing, developing, and maintaining web and mobile applications using .NET, JavaScript, Java, Ruby on Rails, and SQL Server.

Setting up a Dockerized NestJS App with PostgreSQL and Prisma ORM

Snippet Purpose As a developer, I often encounter challenges while setting up a new NestJS application with Docker and PostgreSQL. Despite being a crucial step in the development process, this task can be time-consuming and prone to errors. To streamline this process, I have created this guide to simplify the setup of a Dockerized NestJS app with PostgreSQL and Prisma ORM. This guide is designed to save time and minimize the chances of running into common issues, making it an essential resource for anyone looking to quickly and efficiently set up a NestJS application with Docker and PostgreSQL....

January 30, 2023 · 3 min · Blaise Sebagabo

Center div

Centering a div can sometimes be a frustrating task for developers. It can be especially difficult when trying to center a div both vertically and horizontally. It’s a common problem that many developers face and it’s something that can slow down your workflow. .container { display: flex; /* establish flex container */ flex-direction: column; /* make main axis vertical */ justify-content: center; /* center items vertically, in this case */ align-items: center; /* center items horizontally */ height: 100vh; }

January 25, 2023 · 1 min · Blaise Sebagabo

Stripe

Accept a payment. const stripe = require("stripe")(process.env.STRIPE_API_KEY); export default async (req, res) => { const session = await stripe.checkout.sessions.create({ payment_method_types: ["card"], line_items: [ { name: "Serverless Functions – The Complete Guide", description: "100 page e-book on serverless functions.", images: ["https://site.com/image.png"], amount: "5000", // Cents currency: "usd", quantity: 1, }, ], success_url: "https://site.com/success?session_id={CHECKOUT_SESSION_ID}", cancel_url: "https://site.com", }); return res.status(200).json(session); }; Usage 1. Create Checkout Session Using the function above, create a checkout session returning CHECKOUT_SESSION_ID....

April 3, 2022 · 1 min · Blaise Sebagabo