Skip to content

Instantly share code, notes, and snippets.

View JorgeMadson's full-sized avatar

Jorge Madson JorgeMadson

View GitHub Profile
@JorgeMadson
JorgeMadson / rotate-image.js
Created July 14, 2021 18:24
How to rotate images in browser console
document.getElementsByTagName("img")[0].style.transform = "rotate(270deg)"
@JorgeMadson
JorgeMadson / READ.md
Last active January 31, 2023 22:49
Meu setup pra linux recem instalado

Dev Setup

  1. Run command: chmod +x dev-setup.sh
  2. Run command: ./dev-setup.sh to start the install script

Technical challenge

Here is the description of what you'll need to implement on this technical challenge.

Challenges

1. Cache function

Implement a function, class or module (it can be on the same file - request.py) to cache requests made with the existing code, preventing unecessary calls. You MUST use this Redis module as a cache service. Feel free to change the code within the existing functions, but do not alter their behaviour.

Context: Caching requests can be useful to avoid unecessary HTTP calls for the same resources, however, the resources can change during time, so it is important to keep in mind that cache needs to be invalidated at some point.

@JorgeMadson
JorgeMadson / brasil-sp-timezone.js
Created August 8, 2019 21:40
Data e hora em português com fuso horário de são paulo
new Date().toLocaleString('pt-BR', { timeZone: 'America/Sao_Paulo' });
@JorgeMadson
JorgeMadson / CuidadosMasculinos.md
Last active July 7, 2019 22:35
melhorando a autoestima masculina

Ajeitar a cara

Tem o canal do youtube do cara que foi por onde achei ele, mas tem um blog também é maneiro e organizado, ele ensina como cuidar da pele, cabelo e até o tal da harmonização facial que é o que faz o pessoal de hollywood tem aquele maxilar/mandibula bonita https://www.youtube.com/watch?v=JJXe0_3DJWA https://homensquesecuidam.com/

Ajeitar os dentes

Esse vídeo é bem vlog, mas mostra direitinho o processo pra ficar com os dentes lindos, o canal dessa cara não recomendo tanto pq ele divaga um pouco, mas dá algumas dicas https://www.youtube.com/watch?v=5uF_8CHb2bM

Moda

@JorgeMadson
JorgeMadson / hoursAgo.js
Last active June 26, 2019 14:13
Devolve uma data e hora menos algumas horas atrás
/*
O 19 é a quantidade de horas atrás, só subistituir por outro valor.
*/
new Date(new Date().setHours(new Date().getHours() - 19)).toLocaleString("pt-BR")
@JorgeMadson
JorgeMadson / README.md
Created April 8, 2019 02:23
Prototype of my aplication

TODO

Make an API to automatizate birthday wishes

First step

Connect with a virtual social network, get all friends birthday

Second

Let user choose what message he want to send to all birthday person

@JorgeMadson
JorgeMadson / README.md
Last active September 19, 2019 14:41
Cache in Python

Technical challenge

Here is the description of what you'll need to implement and answer on this technical challenge.

Challenges

You'll answer the 4 following challenges.

1. Cache function ✔️

Implement a function (on the same module - request.py) to cache requests preventing unecessary calls. You MUST use this Redis module as a cache service.

@JorgeMadson
JorgeMadson / koa-xmen-api.js
Last active October 18, 2018 23:59 — forked from brianium/koa-xmen-api.js
Koa.js X-MEN Api
var koa = require('koa');
var app = new koa();
var json = require('koa-json');
app.use(json());
app.use(function* (next) {
if (this.method != 'GET') return yield next;
if (!/x-men/.test(this.originalUrl)) return yield next;
@JorgeMadson
JorgeMadson / geraNum.js
Created September 5, 2018 18:43
Gera numeros para preenchimento de palettes de jogos da Guilda
// 1- Gera um numero random
// 2- Ve se é valido (ñ é um dos excluidos)
// 3- Soma com os outros é igual ao valor final ?
// 4- Soma é possível com os números válidos ?
// Não -> Repete
// Sim -> Fim
// 😂
//Entrada da soma total
var numSoma = prompt("Insira o total da soma: ", 15);