just a test
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
query pages_indexQuery { | |
timeline(context: HOMEPAGE) { | |
...Timeline_data | |
} | |
} | |
fragment Advertisement_data on Advertisement { | |
reviveId: id | |
responsiveId: responsive_id | |
is_hidden |
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 mjml = require('mjml'); | |
const { readFile, writeFile } = require('fs'); | |
const glob = require('glob'); | |
const { promisify } = require('util'); | |
const chalk = require('chalk'); | |
const readFileAsync = promisify(readFile); | |
const writeFileAsync = promisify(writeFile); | |
const globAsync = promisify(glob); | |
const log = { |
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 React = require('react'); | |
() => <span>olar<span> |
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
/** | |
* I love working with cutting-edge technologies and solving problems. | |
* That brought me into the world of modern javascript! | |
* I have worked mainly with web projects touching every layer of the web | |
* stack, since creating web APIs until building web progressive apps. As | |
* a graduated journalist and a self-taught engineer, I have a special interest | |
* in having a transversal comprehension of the product's business, delivering | |
* end to end solutions without prejudice the code maintenance and modularity. | |
* Because of that, I enjoy to write well documented and tested products. | |
* Also, I am a big fan of the open source and whenever possible |
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 getValueBetween = (str) => (startDelimiter, endDelimiter) => | |
str.split(startDelimiter).pop().split(endDelimiter).shift().trim(); | |
const getValueStartingAt = (str) => (startDelimiter, numberOfChars = Infinity) => | |
str.split(startDelimiter).pop().slice(0, numberOfChars).trim(); |
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 insecurity (insecurity) { | |
insecurity(insecurity) | |
} | |
insecurity(insecurity) |
{% gist 123456789 %}
Promises são uma maneira moderna de lidar com javascript assíncrono. Antes de existir as promessas, isso era feito por meio de callbacks.
Graças às Promises, temos agora uma forma mais semântica de lidar com isso. Em vez de dizer:
Callbacks são muito utilizados em javascript. Callback é basicamente uma função que é passada para outra função. Toda função é uma ação, certo? Então imagine que o callback seja uma ação que você quer que aconteça depois de outra ação. Exemplo:
- Alguém me mandou mensagem
- Eu respondo de volta "olar".
Colocando isso em javascript, num formato de callback, seria:
alguemMandouMensagem(respondaOla).