You need to install eslint and some other config libs.
yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier -D
yarn eslint --init
.eslintrc.js
| <label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span> | |
| <select id="country" name="country" class="form-control"> | |
| <option value="Afghanistan">Afghanistan</option> | |
| <option value="Åland Islands">Åland Islands</option> | |
| <option value="Albania">Albania</option> | |
| <option value="Algeria">Algeria</option> | |
| <option value="American Samoa">American Samoa</option> | |
| <option value="Andorra">Andorra</option> | |
| <option value="Angola">Angola</option> |
| var express = require('express'); | |
| var cookieParser = require('cookie-parser'); | |
| var session = require('express-session'); | |
| var flash = require('express-flash'); | |
| var handlebars = require('express-handlebars') | |
| var app = express(); | |
| var sessionStore = new session.MemoryStore; | |
| // View Engines |
| var express = require('express'); | |
| var session = require('express-session'); | |
| var cookieParser = require('cookie-parser'); | |
| var flash = require('connect-flash'); | |
| var app = express(); | |
| app.use(cookieParser('secret')); | |
| app.use(session({cookie: { maxAge: 60000 }})); | |
| app.use(flash()); |
This is a quick tutorial explaining how to get a static website hosted on Heroku.
Why do this?
Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| /* | |
| Create a Mask in an email address | |
| This function create a mask using a valid email address. | |
| This is usefull when someone need to confirm the email used in a system | |
| Author: Gabriel Froes - https://gist.github.com/gabrielfroes | |
| */ | |
| function emailMask(email) { | |
| var maskedEmail = email.replace(/([^@\.])/g, "*").split(''); | |
| var previous = ""; | |
| for(i=0;i<maskedEmail.length;i++){ |
| /* | |
| Create SLUG from a string | |
| This function rewrite the string prototype and also | |
| replace latin and other special characters. | |
| Forked by Gabriel Froes - https://gist.github.com/gabrielfroes | |
| Original Author: Mathew Byrne - https://gist.github.com/mathewbyrne/1280286 | |
| */ | |
| if (!String.prototype.slugify) { | |
| String.prototype.slugify = function () { |
| FROM php:7.2-apache | |
| RUN docker-php-ext-install mysqli | |
| RUN a2enmod rewrite |