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
<script>alert(123);</script> | |
<ScRipT>alert("XSS");</ScRipT> | |
<script>alert(123)</script> | |
<script>alert("hellox worldss");</script> | |
<script>alert(“XSS”)</script> | |
<script>alert(“XSS”);</script> | |
<script>alert(‘XSS’)</script> | |
“><script>alert(“XSS”)</script> | |
<script>alert(/XSS”)</script> | |
<script>alert(/XSS/)</script> |
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
➜ code-to-graph git:(master) yarn test | |
yarn run v1.7.0 | |
$ jest | |
FAIL ./index.test.js | |
● 1 | |
expect(received).toEqual(expected) | |
Expected value to equal: | |
"graph TD |
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 input = document.getElementById('input'); | |
const outPut = document.getElementById('output'); | |
const leftKeys = [ | |
'q', 'w', 'e', 'r', 't', | |
'a', 's', 'd', 'f', 'g', | |
'z', 'x', 'c', 'v', | |
]; | |
const rightKeys = [ |
This is a summary from Yet Another Haskell Tutorial
https://learnxinyminutes.com/docs/pt-br/haskell-pt/
Lazy, pure functional programming language.
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 fixHex = v => v.length === 1 ? `0${v}` : v; | |
const decToHex = v => { | |
return fixHex(parseInt(v, 10).toString(16).toUpperCase()); | |
}; | |
// with map | |
const rgbToHexColor = function() { | |
return [...arguments].map(decToHex).join(''); | |
} |
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
// low perf | |
const fn = n => Math.pow(-1, n)/(2*n + 1); | |
const sum = (a, b) => a + b; | |
const range = (n) => { | |
let i = 0; | |
let numbers = []; | |
while(i < n) { | |
numbers.push(i); | |
i++; |
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 curry = function(fn) { | |
const partial = function(prevArgs = []) { | |
return function() { | |
const nextArgs = [...prevArgs, ...arguments]; | |
if((prevArgs.length + arguments.length) === fn.length) { | |
return fn.apply(null, nextArgs) | |
} else { | |
return partial(nextArgs); | |
} | |
} |
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 isPromise = fn => fn && fn.then; | |
const getUser = () => new Promise((resolve, reject) => { | |
setTimeout(()=> { | |
resolve({name: 'John Lavoier'}); | |
}, 2000); | |
}); | |
const getProfile = () => new Promise((resolve, reject) => { | |
setTimeout(()=> { |
NewerOlder