$ git init <directory>
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
const { execSync } = require('child_process'); | |
const { readFileSync } = require('fs'); | |
const { resolve } = require('path'); | |
function compareVersions(a, b) { | |
return a.replace(/\^|\~|\=/g, '') === b.version; | |
} | |
try { | |
const npmDeps = execSync('npm ls --json'); |
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 ordenarVetorNumerico (vetorNumerico: number[]): number[] { | |
let indiceMenorValor = 0; | |
let auxiliar = 0; | |
const vetorCopia = [...vetorNumerico]; | |
const tamanhoDoVetor = vetorNumerico.length; | |
const quantidadeDeNumeros = tamanhoDoVetor - 1; | |
for (let indiceA=0; indiceA<=quantidadeDeNumeros; indiceA++){ | |
indiceMenorValor = indiceA; | |
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
// open your brave browser on brave home page | |
// press F12 or open your console on brave browser | |
// paste this script | |
// wait until it stops (45sec) | |
function goToEndOfPage(){ | |
scrollToPub(9000000000) | |
} |
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
// copy this script and paste on your console | |
var values = document.querySelectorAll('.flat-view-text-preserve'); | |
var results = []; | |
values.forEach((value, i)=> { if(i % 2 === 0){ results.push({ [value.innerText]: values[i+1].innerText })} }); | |
var textResult = ''; | |
results.forEach((val) => textResult +=`${Object.keys(val)}=${Object.values(val)}\n`); | |
console.log(textResult); |
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
Create S3 bucket | |
> name: CodeDeployBucket | |
--------------------------------------------- | |
Create IAM role for EC2 | |
> name: EC2CodeDeployRole | |
> policy: AmazonEC2RoleforAWSCodeDeploy | |
> set key: | |
> Name: EC2CodeDeployRole |
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
#!/usr/bin/env python | |
from datetime import datetime | |
from json import loads | |
from time import gmtime, mktime, strptime | |
# LevelDict é um wrapper usando dicionário para LevelDB | |
# https://github.com/maurobaraldi/leveldict | |
from leveldict import LevelJsonDict | |
from requests import get |