This file contains hidden or 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
{ | |
"arrowParens": "avoid", | |
"bracketSpacing": true, | |
"endOfLine": "lf", | |
"insertPragma": true, | |
"jsxBracketSameLine": true, | |
"printWidth": 120, | |
"proseWrap": "always", | |
"semi": false, | |
"singleQuote": true, |
This file contains hidden or 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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFtrFYYBEAC2UB4MQCEzfHDe61cbCJXY1grGtoJllIRe+AOkEut9NFadqiG5 | |
+h5r4KPNWnXufbBa7BvBwALYk5Bcs5XlWeaY+kk8wfqM2fd4wDoBJ1xbkZIpKxLw | |
8JzzDrF34VVPhry6JsS2NkSKxzh0hKhHxiGiwzTxRaKxTTQ/7tkO6cbcAa5gf0bf | |
HjxMNxpULrrsTuxtguOlTRXCVeAoddHKRdbv9QJCzM/PNd8xClq0WL/VjT/b6hts | |
tu58hJLgVPwPiUrOami8zBvvg9T8tur77OPIh3fIv6y+RSiku7FVBZ6yN0PRueL+ | |
inDjMmcKPdNMw2/zxCjVazHKOUcVMVYfrf5WwEGGw0MLcQ2Wus1RzKFk/GmLtNZq | |
gniLcmqoE7jwk7z0JGhewMDJVW/Xv1+kHk+lhlcyJJICf6AKLHQkZ2em1IKq2+u5 | |
09qVlRcfA7DQDTYxTIbUE9JLX1Ob783kX5xo9XGKAAI7N4nToDgfXv+a9kB98He1 |
This file contains hidden or 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
calc = (a, b, op) => operations[op](a,b) | |
operations = { | |
'+': (a, b) => a + b, | |
'-': (a, b) => a - b, | |
'*': (a, b) => a * b, | |
'/': (a, b) => a / b | |
} |
This file contains hidden or 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
calc = (a, b, op) => { | |
switch (op) { | |
case '+': | |
return a + b | |
break | |
case '-': | |
return a - b |
This file contains hidden or 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
curl -X POST \ | |
http://localhost:3000/v1/publications \ | |
-H 'Accept: */*' \ | |
-H 'Accept-Encoding: gzip, deflate' \ | |
-H 'Cache-Control: no-cache' \ | |
-H 'Connection: keep-alive' \ | |
-H 'Content-Length: 52540' \ | |
-H 'Content-Type: application/json' \ | |
-H 'Cookie: connect.sid=s%3AWndZpVoG6i3yjJPdHG-Rz25xDLHE8Yxf.qkx3sfEOA%2BncJXUNn85FxzFYWrS3KJAhIDMOzjcOeWw' \ | |
-H 'Host: localhost:3000' \ |
This file contains hidden or 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
<!-- @format --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Diário LDI</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css" /> | |
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script> |
This file contains hidden or 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
// seletor com xpath | |
/html/body/table/tbody/tr[3]/td/table/tbody/tr/td[1] | |
// fn que pega elemento via xpath | |
function getElementByXpath(path) { | |
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
} | |
// sobrescrever com innerHTML | |
elemento.innerHTML = '<span>novo html</span>' |
This file contains hidden or 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
[{"frase":"Se você ama realmente, nunca desista, a distância não é nada quando o amor é tudo.","autor":"Tumblr"}, | |
{"frase":"Sempre terá alguma “dor” em você, mais nunca desista. Você quer, você pode, e só superar.","autor":"Chorão"}, | |
{"frase":"A lição é a seguinte: nunca desista, nunca, nunca, nunca. Em nada. Grande ou pequeno, importante ou não. Nunca desista. Nunca se renda à força, nunca se renda ao poder aparentemente esmagador do inimigo.","autor":"Winston Churchill"}, | |
{"frase":"Nunca desista de seus sonhos!","autor":"Augusto Cury"}, | |
{"frase":"A glória da amizade não é a mão estendida, nem o sorriso carinhoso, nem mesmo a delícia da companhia. É a inspiração espiritual que vem quando você descobre que alguém acredita e confia em você.","autor":"Ralph Waldo Emerson"}, | |
{"frase":"Motivação é a arte de fazer as pessoas fazerem o que você quer que elas façam porque elas o querem fazer.","autor":"Dwight Eisenhower"}, | |
{"frase":"Tudo o que um sonho precisa para ser realizado é alguém que acredite que ele possa s |
This file contains hidden or 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 m = require('moment') | |
const [ontem, hoje, amanha] = [ '2020-05-13', '2020-05-14', '2020-05-15' ] | |
const igual = (a,b) => a == b | |
const igualStrict = (a,b) => a === b | |
const maiorQue = (a,b) => a > b | |
const menorQue = (a,b) => a < b | |
const comparaString = (a, b, op) => op(a, b) |
This file contains hidden or 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
/* | |
* Bookmarklets are a bit of a lost art these days, | |
* most people don't even know they exist anymore. | |
* They are lighter than any "extension", and can | |
* still perform really complex actions. Writing | |
* them is also a good way to flex your DOM/JS skills. | |
*/ | |
// opens current URL on the Way Back Machine. It works on most cases. | |
javascript:(function(){if(document.URL === "data:text/html,chromewebdata" || document.URL === "chrome-error://chromewebdata/"){location.href='http://web.archive.org/web/*/'+loadTimeData.data_.summary.failedUrl;}else{location.href='http://web.archive.org/web/*/'+document.URL;}}()) |