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
ul { | |
list-style-type: none; | |
li:before { | |
content: "- "; | |
} | |
} |
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
// arrow binds to window this, don't use it here to work with other properties of the object | |
const calculate = { | |
array: [1, 2, 3], | |
sum: () => { | |
console.log(this === window); // => true | |
return this.array.reduce((result, item) => result + item); | |
} | |
}; | |
console.log(this === window); // => true | |
// Throws "TypeError: Cannot read property 'reduce' of undefined" |
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
/* eslint-disable react-hooks/exhaustive-deps */ |
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
"editor.rulers": [ | |
{ | |
"column": 80, | |
"color": "#ffffff07" | |
}, | |
{ | |
"column": 120, | |
"color": "#ffffff59" | |
}, | |
], |
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
.children-container { | |
height: 100%; | |
padding: 2.5rem 0; | |
overflow-y: scroll; | |
&::-webkit-scrollbar { | |
-webkit-appearance: none; | |
} | |
&::-webkit-scrollbar:vertical { |
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
"editor.tokenColorCustomizations": { | |
"[Default Dark+]": { | |
"textMateRules": [ | |
{ | |
"scope": ["variable.other.constant", "variable.other.enummember"], | |
"settings": { | |
"foreground": "#9CDCFE" | |
} | |
} | |
] |
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
{ | |
"extensions": { | |
"endpoints": { | |
"whatever you wanna label/name this endpoint": { | |
"url": "https://somewebsite.com/graphql" | |
} | |
} | |
} | |
} |
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
async function wait(ms) { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); | |
} |
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 barker = (state) => ({ | |
bark: () => console.log(`My name is ${state.name}`) | |
}); | |
const walker = () => ({ | |
walk: (distance) => console.log(`I just walked ${distance} km`) | |
}); | |
const dog = (name) => { | |
let state = { |
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
let d = new Date(); | |
d.setHours(24, 0, 0, 0); | |
let date = d; | |
let dateInEpochMilliseconds = Date.parse(d); | |
console.log(date); | |
console.log(dateInEpochMilliseconds); | |
// or | |
dateInEpochMilliseconds = new Date().setHours(24, 0, 0, 0); |