Skip to content

Instantly share code, notes, and snippets.

View The-Anton's full-sized avatar
:octocat:
man with million dreams

Shekhar Singh The-Anton

:octocat:
man with million dreams
View GitHub Profile
@The-Anton
The-Anton / node_nginx_ssl.md
Created November 16, 2021 17:18 — forked from bradtraversy/node_nginx_ssl.md
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

@The-Anton
The-Anton / nodejs-cheatsheet.js
Created May 23, 2022 19:01 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@The-Anton
The-Anton / gcp-storage.js
Created August 25, 2022 23:20 — forked from antarikshc/gcp-storage.js
Code sample to upload files in Google Cloud Storage bucket for Node.js
// Install GCP Client library
// npm install --save @google-cloud/storage
// To run the client library, you must first set up authentication by creating a service account
// and setting an environment variable. Ask your DevOps person to provide you with service account key
// For example:
// export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/[FILE_NAME].json"
// Imports the Google Cloud client library
const { Storage } = require('@google-cloud/storage');
import flask
import io
import string
import time
import os
import numpy as np
import tensorflow as tf
from PIL import Image
from flask import Flask, jsonify, request