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 calcularRendaInvestindoParcelas(valor, meses, incluirIOF = true) { | |
const CDI = 13; | |
let rendimento = 0; | |
for(let index = 0; index < meses; index++) { | |
const saldoRestante = valor - valor / meses * index; | |
const porcentagemRendaMensal = CDI / 100 / 12; | |
rendimento += (saldoRestante + rendimento) * porcentagemRendaMensal; | |
if(index === 0 && incluirIOF) { | |
// IOF no primeiro mês |
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
setInterval(() => { | |
i=atob('aHR0cHM6Ly9pMS5zbmRjZG4uY29tL2FydHdvcmtzLWxHdXU5bnRES0FSeTZ6YjAtMldMUUxBLXQ1MDB4NTAwLmpwZw=='); | |
Array.from(document.querySelectorAll(`img:not([src="${i}"])`)) | |
.forEach(image => image.src = i); | |
Array.from(document.querySelectorAll('svg')) | |
.forEach(svg=>svg.outerHTML=`<img src="${i}" style="height:${svg.clientHeight}px;width:${svg.clientWidth}px"></img>`) | |
},100); |
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
import {configureStore, createSlice} from '@reduxjs/toolkit'; | |
import {useDispatch, useSelector, Provider} from "react-redux" | |
// ------------------------------------------ | |
// CONFIGURAR SEU SLICE | |
const configuracoesSlice = createSlice({ | |
name: 'configuracoes', | |
// propriedades que iniciarão por padrão | |
initialState: { |
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
import { | |
configureStore, | |
createSlice | |
} from '@reduxjs/toolkit'; | |
// ------------------------------------------ | |
// CONFIGURAR SEU SLICE | |
const configuracoesSlice = createSlice({ | |
name: 'configuracoes', |
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 KillPort { npx kill-port $args[0] } | |
Set-Alias -Name killport -value KillPort | |
Function GitCommit { git commit -m $args[0] } | |
Set-Alias -Name commit -value GitCommit | |
Function GitPull { git pull origin @args } | |
Set-Alias -Name opull -value GitPull | |
Function GitPush { git push origin @args } |
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 AND PASTE IT IN YOUR BROWSER ------------------------ | |
function generateThemeScript(themeName) { | |
const getTheme = (themeName) => { | |
const themeStorage = JSON.parse(localStorage.CARBON_THEMES || "[]"); | |
return themeStorage.find(theme => theme.name === themeName) | |
} | |
const addTheme = (theme) => { | |
const themeStorage = JSON.parse(localStorage.CARBON_THEMES || "[]"); |
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 validateType(expected, input) { | |
if (!input) return false; | |
// maps verifications for standard types and custom classes | |
const typeVerifier = { | |
Object: (x) => typeof x === 'object' && | |
!Array.isArray(x) && | |
x !== null, | |
String: (x) => typeof x === 'string', | |
Number: (x) => typeof x === 'number', |
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 compareNums(comparison) { | |
if (!comparison) return false; | |
const validFormat = /\d+(([<>]=*)\d+)*/; | |
const removeSpaces = str => str.replace(/\s/g, ''); | |
comparison = removeSpaces(comparison); | |
const [match] = comparison.match(validFormat); | |
if (match.length !== comparison.length) { |
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 (interval = 0) { | |
document | |
.querySelectorAll('[class="artdeco-button artdeco-button--2 artdeco-button--secondary ember-view invitation-card__action-btn"]') | |
.forEach((btn, i) => setTimeout(() => btn.click(), i * interval)); | |
})(1000) | |
// You can change the 1000, it will be the interval to avoid spamming all at once |
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 pombify = (phrase) => { | |
return phrase | |
.split(' ') | |
.map((word) => { | |
const wordLetters = word.split('') | |
return wordLetters | |
.map((letter, index) => { | |
const charCode = letter.charCodeAt(0); | |
const binary = charCode | |
.toString(2) |
NewerOlder