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
#!/bin/bash | |
# file input.txt must contains *.m3u8 links line by line | |
# !!! installed ffmpeg required | |
# You can change/remove Referer if in my case i needed it to bypass blocking requests from another domain | |
INDEX=1 | |
for file in $(cat ./input.txt) | |
do |
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
qlmanage -p (find ./src/ -type f \( -name "*.png" -o -name "*.svg" -o -name "*.jpeg" -o -name "*.jpg" \)) |
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 get = (obj, keys) => | |
!Object.hasOwn(obj, keys[0]) | |
? null | |
: keys.length === 1 | |
? obj[keys[0]] | |
: get(obj[keys[0]], keys.slice(1)); | |
export default get |
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
export default (_words) => { | |
const words = _words.split(' ').map(word => word.toLowerCase()).filter(Boolean); | |
return [...new Set(words)].reduce((acc, word) => ({ ...acc, [word]: words.filter(_word => _word === word).length}), {}) | |
} |
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
export default (obj, keysArr) => { | |
return Object.fromEntries(Object.entries(obj).filter(([key]) => keysArr.includes(key))) | |
} |
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
// @ts-check | |
/* eslint-disable no-param-reassign */ | |
import crc32 from 'crc-32'; | |
const collision = (map, key, hash) => map[hash] && key !== map[hash][0] | |
// BEGIN (write your solution here) | |
export const get = (map, key, defaultValue = null) => { | |
const hash = crc32.str(key) |
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
// @ts-check | |
/* eslint no-restricted-syntax: ["off", "ForOfStatement"] */ | |
// BEGIN (write your solution here) | |
const map = { | |
G: "C", | |
C: "G", | |
T: "A", | |
A: "U", | |
} |
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
export default (searchIn, searchVal) => searchIn.find(item => Object.keys(searchVal).every(searchKey => item[searchKey] === searchVal[searchKey])) || null |
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
export enum PopoverPositionType { | |
VERTICAL, | |
HORIZONTAL, | |
} | |
/** | |
* @param {Element|String} value | |
* @returns {Element} | |
*/ | |
export const getHTMLElementFromArgument = (value): Element => { |
OlderNewer