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
Array.prototype.map = function (callback) { | |
const result = [] | |
for (let i = 0; i < this.length; i++) { | |
result.push(callback(this[i], i, this)) | |
} | |
return result | |
} |
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 shuffle = require('./shuffle') | |
const example = [1, 2, 3] | |
const shuffled = shuffle(example) | |
/* | |
shuffled can be any of these: | |
- [1, 2, 3] | |
- [1, 3, 2] |
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
[ | |
{ | |
"x": 1, | |
"y": 1, | |
"label": "A" | |
}, | |
{ | |
"x": 1, | |
"y": 2, | |
"label": "A" |
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 Reactotron from 'reactotron-react-native' | |
const host = '192.168.0.105' | |
console.tron = Reactotron | |
.configure({ host }) | |
.useReactNative() | |
.connect() |
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 nodemailer = require('nodemailer') // Importa o módulo principal | |
const transporter = nodemailer.createTransport({ // Configura os parâmetros de conexão com servidor. | |
host: 'smtp.umbler.com', | |
port: 547, | |
secure: false, | |
auth: { | |
user: 'exemplo@gabrielrufino.com', | |
pass: 'ex3mpl0' | |
} |
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 nodemailer = require('nodemailer') // Importa o módulo principal | |
const transporter = nodemailer.createTransport({ // Configura os parâmetros de conexão com servidor. | |
host: 'smtp.umbler.com', | |
port: 547, | |
secure: false, | |
auth: { | |
user: 'exemplo@gabrielrufino.com', | |
pass: 'ex3mpl0' | |
} |
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 nodemailer = require('nodemailer') // Importa o módulo principal | |
const transporter = nodemailer.createTransport({ // Configura os parâmetros de conexão com servidor. | |
host: 'smtp.umbler.com', | |
port: 547, | |
secure: false, | |
auth: { | |
user: 'exemplo@gabrielrufino.com', | |
pass: 'ex3mpl0' | |
} |
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 nodemailer = require('nodemailer') // Importa o módulo principal |
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 generator = () => { | |
const middlewares = [] | |
const use = (fn) => middlewares.push(fn) | |
const runMiddleware = index => { | |
if (index < middlewares.length) { | |
middlewares[index](() => runMiddleware(index + 1)) | |
} | |
} |