Skip to content

Instantly share code, notes, and snippets.

View abidtkg's full-sized avatar
:atom:
Converting idea to code

Abid Hasan abidtkg

:atom:
Converting idea to code
View GitHub Profile
@nyx-code
nyx-code / FileUpload.js
Last active November 25, 2022 20:50
This NodeJS API which will upload files onto the AWS S3 Bucket. Video -> https://youtu.be/TtuCCfren_I
require('dotenv/config')
const express = require('express')
const multer = require('multer')
const AWS = require('aws-sdk')
const uuid = require('uuid/v4')
const app = express()
const port = 3000
// Sending an HTTP Request from a NodeJS server
//const http = require("http");
const https = require("https");
const Stream = require("stream").Transform;
const fs = require("fs");
https
.get("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY", resp => {
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active June 29, 2024 21:53
Node app deploy with nginx & SSL

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

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@alaminfirdows
alaminfirdows / Bengali.php
Created July 9, 2019 13:02
Laravel Bangla Date, Time and Number
<?php
class Bengali
{
// Numbers
public static $bn_numbers = ["১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯", "০"];
public static $en_numbers = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
// Months
public static $en_months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
public static $en_short_months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
@indyfromoz
indyfromoz / aspnet-mvc.gitignore
Created November 19, 2012 06:44
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache