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 isBalanced = (s) => { | |
const stack = []; | |
const charArray = s.split(""); | |
for (const [index, char] of charArray.entries()) { | |
switch (char) { | |
// insert | |
case "(": | |
case "[": | |
case "{": |
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 Queue from 'queue-promise' | |
const newPage = () => { console.log('newPage called'); } | |
const window = { lpTag: {} } | |
// script loading | |
setTimeout(() => { window.lpTag.newPage = newPage; console.log('script arrived'); }, 1500) | |
// ************ QUEUE | |
// const queue = new Queue({ | |
// interval: 1000, |
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
`"@babel/core": "^7.4.3", | |
"@babel/plugin-proposal-class-properties": "^7.4.4", | |
"@babel/plugin-transform-modules-commonjs": "^7.6.0", | |
"@babel/plugin-transform-react-jsx": "^7.3.0", | |
"@babel/polyfill": "^7.6.0", | |
"@babel/preset-env": "^7.4.3", | |
"babel-eslint": "^10.0.1",` | |
.replace(/"(@babel\/[a-z-]*)(.*)\n/g,'$1') | |
.replace(/\s+/g,' ') |
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
# comment | |
Host git.custom.net | |
HostName git.custom.net | |
User git | |
IdentityFile ~/.ssh/id_rsa_custom |
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
git config --global alias.co checkout | |
git config --global alias.ci commit | |
git config --global alias.ft fetch | |
git config --global alias.st status |
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
var x = { | |
c: 1, | |
a: c, | |
}; | |
x(); |
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
{"lastUpload":"2020-10-22T12:59:27.584Z","extensionVersion":"v3.4.3"} |
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
/** | |
* @param {string} str : multiline string | |
* @return {string} result | |
*/ | |
function genProps(str){ | |
let arr = str.split('\n'); | |
let ini = 'public string '; | |
let fim = ' {get;set;}\n'; | |
return ini+ arr.join(fim + ini) + fim; | |
} |
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 getMonday(d) { | |
d = new Date(d); | |
var day = d.getDay(), | |
diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday | |
return new Date(d.setDate(diff)); | |
} |
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
let interval; | |
const blink = () => { | |
interval = setInterval(() => $('.cursor').toggle(), 600); | |
}; | |
const stopBlinking = () => { | |
clearInterval(interval); | |
} |
NewerOlder