Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active October 24, 2025 01:17
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

@jremi
jremi / resume.json
Last active May 25, 2023 19:44
Resume
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Jremi",
"label": "Full-Stack Developer",
"summary": "I’m a remote full-stack Javascript developer with a frontend focus utilizing Vue.js",
"website": "https://jzbg.dev",
"picture": "https://avatars.githubusercontent.com/u/5322988",
@celeroncoder
celeroncoder / README.md
Created March 21, 2021 10:37
Netlify Server Functions

Server Less Functions

Instructions

  • Create a netlify.toml file for using serverless functions on the website hosted on Netlify.
  • If any other hosting service search for the documentation for creating .toml file.
  • Put the functions in the functions directory in the root of the project.
  • Every function file must contain one export handler and only that will be valid and can be used.
    exports.handler = async function(event, context) {...};
@WietseWind
WietseWind / compile.bash
Last active October 12, 2021 08:35
Hook in AssemblyScript
npx asc src/assembly/hook.ts \
-O3 \
--noAssert \
--runtime minimal \
-b build/hook.wasm \
-t build/hook.wat \
-d build/hook.d.ts
@duanescarlett
duanescarlett / index.js
Last active April 10, 2022 00:37
Send Ether to another wallet
ethers = require('ethers')
require('dotenv').config()
async function main () {
// Connect to an EVM network
const provider = new ethers.providers.JsonRpcProvider(`https://polygon-mainnet.g.alchemy.com/v2/${process.env.RPC_KEY}`)
// Get the gas price
const gasPrice = provider.getGasPrice()
// Create a wallet object from private key
const wallet = new ethers.Wallet(`${process.env.PRIVATE_KEY}`)