Skip to content

Instantly share code, notes, and snippets.

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

Adewuyi Taofeeq Olamilekan harmlessprince

🏠
Working from home
View GitHub Profile
@harmlessprince
harmlessprince / Dockerfile
Last active September 28, 2024 19:54
Docker compose laravel configs
FROM php:8.3-fpm
ARG user
ARG uid
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form id="paymentForm">
<div class="form-group">
<input type="text" id="reference" value="REF-TYWYZP-22"/>
{{define "subject"}}{{.Subject}}{{end}}
{{define "htmlBody"}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forgot Password</title>
</head>
<body>
@harmlessprince
harmlessprince / Makefile
Created June 1, 2024 11:24
Make File for Golang
# Define the default target
.PHONY: default
default: help
.PHONY: help
help:
@echo "Available targets:"
@echo " seeder FILENAME Process the specified seeder file name"
# application repository and binary file name

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

Sometimes we need to run multiple nodejs app on same server with different domain or sub domain like admin.domain.com, api.domain.com and also need to run both nodejs or reactjs app concurrently. We can do this using 2 things , first of all we need to install nginx in our server for reverse proxy to connect different domain, and for running multiple nodejs app concurrently we can use PM2 NodeJs Process Manager

Please Make sure that you have installed these things on your server

  • NodeJS
This file has been truncated, but you can view the full file.
[
{
"id": 233,
"name": "United States",
"iso3": "USA",
"iso2": "US",
"numeric_code": "840",
"phone_code": "1",
"capital": "Washington",
<?php
class SendMail
{
private $sendTo;
private $from;
private $name;
private $subject;
private $message;
private $headers;
private $attachment;
<?php
return [
[
'code' => 'BAG',
'desc' => 'Bag',
],
[
'code' => 'CTN',
'desc' => 'Carton'
],
@harmlessprince
harmlessprince / dateFormats.php
Created May 10, 2021 20:55
An array of 13 date formats
<?php
return [
[
"id" => 1,
"date_order" => 'MM/DD/YY',
'Description' => 'Month-Day-Year with leading zeros (02/17/2009)'
],
[
"id" => 2,
"date_order" => 'DD/MM/YY',