Skip to content

Instantly share code, notes, and snippets.

View caeb92's full-sized avatar
💯
Focusing

Camilo Andrés Elgueta Basso caeb92

💯
Focusing
  • Neox
  • Santiago, Chile
View GitHub Profile
@caeb92
caeb92 / README.MD
Created February 22, 2020 21:24
PM2 fork and cluster mode configuration examples

Configure a new PM2 ecosytem

You must especificate the file JSON wich have the proper configuration for your app wich environment do you want to use (declared in your ecosystem file).

pm2 start ecosystem_cluster_mode.json --env production
pm2 save (Autostart your application when PM2 service is started/restarted)
pm2 ls (Shows PM2 runnings apps)
netstat -ntpl | grep pm2 (Filter running PM2 applications)

Flag --env

@caeb92
caeb92 / newincident.hbs
Created April 1, 2020 19:56
Example nodejs typescript : Send emails with Nodemailer - Handlebars
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.card {
@caeb92
caeb92 / canvas.html
Created April 7, 2020 19:21
HTML5 canvas draw lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>DRAW</title>
@caeb92
caeb92 / Dockerfile
Created July 14, 2020 04:38
Dockerfile nodejs
FROM node:12-alpine
RUN mkdir /home/node/app/ && chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY --chown=node:node package*.json ./
USER node
RUN npm install --loglevel=error
COPY --chown=node:node server.js .
COPY --chown=node:node lib ./lib/
EXPOSE 8080
CMD [ "node", "server.js" ]
@caeb92
caeb92 / skeleton.css
Created October 25, 2020 15:46
Medium - skeletons
/* BASE SKELETON*/
.skeleton {
display: inline-block;
height: 1em;
position: relative;
overflow: hidden;
background-color: #bdbdbd;
border-radius: 2px;
}