Skip to content

Instantly share code, notes, and snippets.

View ifeekz's full-sized avatar
🏠
Working from home

Nnorom Ifeanyi Paul ifeekz

🏠
Working from home
  • Nigeria
View GitHub Profile
@ifeekz
ifeekz / calendar.tsx
Created July 1, 2024 05:35 — forked from mjbalcueva/calendar.tsx
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@ifeekz
ifeekz / dev.yml
Created January 27, 2024 07:33 — forked from maxkostinevich/dev.yml
Github Actions - Deploy Serverless Framework (AWS)
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
# If you're using env.yml file, store its content as ENV Github secret
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
@ifeekz
ifeekz / index.js
Created September 8, 2023 10:38 — forked from TheoOkafor/index.js
Setup for running an SQL Queries from file in a NodeJS App (SQLite)
// Require or import the dependencies
const fs = require("fs");
const sqlite3 = require("sqlite3").verbose();
// Read the SQL file
const dataSql = fs.readFileSync("./data.sql").toString();
// Setup the database connection
let db = new sqlite3.Database("mydatabase", err => {
if (err) {
@ifeekz
ifeekz / DigitalOcean.md
Created August 8, 2023 18:57 — forked from pilotpirxie/DigitalOcean.md
Node.js + Nginx + Redis + MySQL + PM2 configuration on DigitalOcean

Node.js + Nginx + Redis + MySQL + PM2 configuration on DigitalOcean

Installation

  1. Install LEMP stack
  2. Overwrite /etc/nginx/nginx.conf
# /etc/nginx/nginx.conf

user www-data;
@ifeekz
ifeekz / deploy_node_do.md
Created June 18, 2023 04:36 — forked from carlssonk/deploy_node_do.md
Deploy node.js app to DigitalOcean

Deploy Node.js Application to DigitalOcean

This step by step tutorial will show you how to set up a Node.js server with MongoDB to DigitalOcean using PM2, NGINX as reverse proxy and a SSL from LetsEncrypt. We will also add a custom domain name.

Prerequisites

Create Droplet & Generate SSH Key

@ifeekz
ifeekz / ubuntu-nextjs-nginx-config-file
Last active July 30, 2023 14:49 — forked from oelbaga/01 - Setup Nextjs site on Ubuntu Server - Terminal commands
Setup NextJS app on Digital Ocean Ubuntu server Full Terminal Commands Step by Step
#nginx config file for Nextjs App
#place in /etc/nginx/sites-available/name_of_config_file
server {
listen 80;
server_name domainname.com;
gzip on;
gzip_proxied any;
gzip_types application/javascript application/x-javascript text/css text/javascript;
gzip_comp_level 5;
@ifeekz
ifeekz / gist.md
Created May 10, 2023 07:29 — forked from ArcRanges/gist.md
aws-ec2-nextjs

Instructions to properly set up a production-ready NextJS App with AWS

This is a summary of how to start your own NextJS app, create the repo on Github, upload later in an AWS EC2 Instance and automate the process with AWS Codebuild, CodeDeploy, & CodePipeline.

After following these instructions you should be able to:

  • Create a NextJS App
  • Create an AWS EC2 instance
  • Be able to SSH to an EC2 instance
  • Prepare the instance as a Node environment
  • Configure Nginx service for proper routing
  • Configure domain and add SSL