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
function addAllSongsOfPageToBookmarks() { | |
const queue = Array.from(document.querySelectorAll('[data-type="add_bookmark"]')); | |
let i = 0; | |
const intervalId = setInterval(() => { | |
if (!queue.length) { | |
clearInterval(intervalId); | |
console.log(`there's no songs to add to bookmark from this page`); | |
return; | |
}; | |
const e = queue.pop(); |
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
# Generated by Powerlevel10k configuration wizard on 2019-09-07 at 14:42 EEST. | |
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 16947. | |
# Wizard options: nerdfont-complete + powerline, small icons, lean, time, 1 line, | |
# compact, many icons, concise. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate | |
# your own config based on it. | |
# | |
# Tip: Looking for a nice color? Here's a one-liner to print colormap. |
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
import React from 'react'; | |
import styled from 'styled-components'; | |
const Header = styled.label` | |
cursor: pointer; | |
`; | |
const Title = styled.p` | |
`; |
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 asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array); | |
} | |
} |
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 getChunks = (arr, size) => { | |
const sets = []; | |
const chunks = arr.length / size; | |
let i = 0; | |
while (i < chunks) { | |
sets[i] = arr.splice(0, size); | |
i++; | |
} |