Skip to content

Instantly share code, notes, and snippets.

View akiyamaSM's full-sized avatar
🔥

Inani El Houssain akiyamaSM

🔥
View GitHub Profile
@akiyamaSM
akiyamaSM / 2019-https-localhost.md
Created October 27, 2022 16:25 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

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).

@akiyamaSM
akiyamaSM / Carddetection.js
Created May 10, 2018 16:17 — forked from swapnilmishra/Carddetection.js
Javascript function to detect type of debit/credit card
function getCardType(cardNum) {
if(!luhnCheck(cardNum)){
return "";
}
var payCardType = "";
var regexMap = [
{regEx: /^4[0-9]{5}/ig,cardType: "VISA"},
{regEx: /^5[1-5][0-9]{4}/ig,cardType: "MASTERCARD"},
{regEx: /^3[47][0-9]{3}/ig,cardType: "AMEX"},