Skip to content

Instantly share code, notes, and snippets.

View ooredroxoo's full-sized avatar
🎯
Focusing

Rafael Nascimento Sampaio ooredroxoo

🎯
Focusing
View GitHub Profile
@ooredroxoo
ooredroxoo / jurosCompostos.js
Created July 23, 2021 14:11
Simulação Simples de Juros
let calculaJuros = () => {
let aporteMensal = 2500; // 2.5k reais
let jurosMensais = 0.005; // 0.5%
let meses = 12 * 20; // 20 anos
let acumulado = 0;
for(let i = 0; i < meses; i++) {
let juros = acumulado * jurosMensais;
acumulado += aporteMensal + juros;
@ooredroxoo
ooredroxoo / velha.py
Created February 18, 2016 06:53
Jogo da Velha em Python
### ================================================== ###
### ###
### Pequeno jogo da velha em python, para aprender a ###
### programar python usando dicionários e estruturas ###
### de controle. ###
### ###
### ================================================== ###
def makeBoard() :
theBoard = {};
@ooredroxoo
ooredroxoo / captureInfo.js
Last active September 4, 2015 18:28 — forked from henriqueog/captureInfo.js
Scripts para obter informações para scripts de automação.
//classe dos elementos DIV que contem o vídeo
//k-u-P-m
//o attribute que precisamos para pegar o id do vídeo
//data-id
//pegando os vídeos
VideoElements = document.getElementsByClassName('k-u-P-m');
for (var i = 0, total = VideoElements.length; i < total; i++) {
@ooredroxoo
ooredroxoo / bolao.js
Last active August 29, 2015 14:11
Bolão da UBC
(function () {
// Função que dá as bolas numeradas para o sorteio
var getBolas = function () {
var numPossiveis = [];
for (var i = 1; i < 61; i++) {
numPossiveis.push(i);
}
return numPossiveis;
};
@ooredroxoo
ooredroxoo / forloop.js
Created October 3, 2013 06:15
Revendo como o loop do for funciona.
var n = 10;
var decrementaN = function () {
n = n-1;
};
for (var i = 0; i < n;decrementaN()) {
console.log(n)
}
@ooredroxoo
ooredroxoo / underscorefy.bookmarklet.js
Created June 11, 2013 00:17
Underscorefy is an equivalent project jQuerify posted in April 2009 on the site http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet, the gist of this order is to provide a bookmarklet to inject Underscore.js within any page. The practical uses for my person are able to use the functions within the underscore.js devto…
javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js');document.getElementsByTagName('body')[0].appendChild(s);})()