This file contains 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
#BACKUP YOUR FILES FIRST | |
#EDITS FOR httpd.conf | |
#1. Uncomment these lines | |
LoadModule ssl_module modules/mod_ssl.so | |
Include /Applications/MAMP/conf/extra/httpd-ssl.conf | |
#2. Change ServerName value | |
ServerName localhost:443 |
This file contains 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
#This is just a listing of the commands for generating your SSL certificates | |
#Run these commands one at a time from inside your ~/ssl folder | |
#Make sure you create your server.csr.cnf and your v3.ext files first inside the same folder | |
#private key generation | |
#This will ask you for a passphrase(password) do NOT lose this file or the password | |
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048 | |
#create root certificate | |
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem |
This file contains 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
authorityKeyIdentifier = keyid, issuer | |
basicConstraints = CA:FALSE | |
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = localhost |
This file contains 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
[req] | |
default_bits= 2048 | |
prompt= no | |
default_md= sha256 | |
distinguished_name = dn | |
[dn] | |
C = CA | |
ST = ON | |
L = Ottawa | |
O = End Point |
This file contains 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
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
This file contains 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
function is_cnpj(c) { | |
var b = [6,5,4,3,2,9,8,7,6,5,4,3,2]; | |
if((c = c.replace(/[^\d]/g,"")).length != 14) | |
return false; | |
if(/0{14}/.test(c)) | |
return false; | |
for (var i = 0, n = 0; i < 12; n += c[i] * b[++i]); |
This file contains 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
PASSOS: | |
1) alterar no arquivo index.js o nome do projeto de "node-ant" para "node_ant" na geração da tag <project>. Isso foi necessário para conseguirmos recuperar a referência ao nome do projeto no código javascript que iremos escrever no teste item (3). Não sei como o ant gera o nome quando usamos "-" no meio desse nome. | |
2) alterar no arquivo jxon.js o trecho de código: | |
... | |
else if (key === 'keyValue') { | |
keyValue = cur; | |
} |