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
BACKEND: | |
Same-Site=None; | |
Secure; | |
FRONTEND: | |
credentials=true // on all requests |
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 anchorTags = document.getElementsByTagName('a') | |
let urls = [] | |
for (let index = 0; index < anchorTags.length; index++) { | |
const regExp = new RegExp(/^\s*\n*folder-name/g) // use RegExp or water to get the currect anchors | |
if(regExp.test(anchorTags[index].innerHTML)){ | |
urls.push(anchorTags[index].href) | |
} | |
} | |
for(let i = 0 ; i < urls.length ; i++){ | |
let newWindow = window.open(urls[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
<div class="tw-h-96 tw-bg-blue-500 tw-flex tw-flex-col"> | |
<div class="tw-h-12 tw-bg-yellow-400 ">close</div> | |
<div class="tw-h-12 tw-bg-orange-300">tabs</div> | |
<div class=" tw-flex-1 tw-bg-red-500">data</div> | |
</div> | |
https://play.tailwindcss.com/fVWkGy9snb |
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
npm view webpack version |
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 log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done |
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 formatAsTextValue(list, { text, value }) { | |
return list.map((item) => ({ text: item[text], value: item[value] })); | |
} | |
formatAsTextValue( | |
[ | |
{ id: 1, name: "Adam" }, | |
{ id: 2, name: "Alonso" }, | |
], | |
{ text: "name", value: "id" } |
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 debounce(cb, wait = 1000) { | |
let timeout; | |
return (...args) => { | |
clearTimeout(timeout); | |
timeout = setTimeout(cb(...args), wait); | |
} | |
} |
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 diff HEAD^ HEAD --quiet ':!<folder_name>' | |
// E.g. I wanted to stop deployment when changes occured in cypress folder | |
// I put below code in the Ignored Build Step Command on Vercel | |
git diff HEAD^ HEAD --quiet ':!cypress' |