This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: Neel Bhanushali <[email protected]> | |
document.addEventListener('keydown', function(e) { | |
// add scan property to window if it does not exist | |
if(!window.hasOwnProperty('scan')) { | |
window.scan = [] | |
} | |
// if key stroke appears after 10 ms, empty scan array | |
if(window.scan.length > 0 && (e.timeStamp - window.scan.slice(-1)[0].timeStamp) > 10) { | |
window.scan = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const expressSession = require('express-session') | |
const app = express() | |
const user1 = { | |
name: 'Marcos Soares', | |
age: 29 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://www.gstatic.com/firebasejs/9.2.0/firebase-app-compat.js"></script> | |
<script src="https://www.gstatic.com/firebasejs/9.2.0/firebase-messaging-compat.js"></script> | |
<script> | |
firebase.initializeApp({ | |
apiKey: "", | |
authDomain: "", | |
projectId: "", | |
storageBucket: "", | |
messagingSenderId: "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.4-fpm-alpine | |
RUN apk update --no-cache \ | |
&& apk add \ | |
icu-dev \ | |
oniguruma-dev \ | |
tzdata | |
RUN apk add --no-cache --virtual .build-deps \ | |
g++ make autoconf yaml-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.2" | |
services: | |
nginx: | |
container_name: nginx | |
image: nginx:1.17.8 | |
ports: | |
- 80:80 | |
volumes: | |
- ./config/nginx/site.conf:/etc/nginx/conf.d/site.conf | |
- ./php_app:/php_app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.2" | |
services: | |
nginx: | |
container_name: nginx | |
image: nginx:1.17.8 | |
ports: | |
- 80:80 | |
volumes: | |
- ./config/nginx/site.conf:/etc/nginx/conf.d/site.conf | |
- ./php_app:/php_app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:11-alpine | |
WORKDIR /node_app | |
CMD [ "npm", "run", "dev"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express") | |
const apiRouter = express.Router() | |
const APPLICATION = "MYAPP" | |
const app = express() | |
apiRouter.get("/healthCheck", (req, res) =>{ | |
res.status(200).json({ | |
message : "api is running..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "node_app_rest_api", | |
"version": "1.0.0", | |
"description": "Exemplo de api que comunicará com NGINX usando proxy reverso", | |
"main": "app.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "npm install; nodemon --legacy-watch", | |
"start": "node ./app.js" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:11-alpine | |
WORKDIR /node_app | |
COPY . /node_app | |
RUN npm install | |
CMD [ "npm", "start"] |
NewerOlder