Download ringtones
https://github.com/yt-dlp/yt-dlp
yt-dlp -x --audio-format m4a --audio-quality 0 ...
# Ringtones should be no more then 35 seconds
mv *.m4a *.m4r| $$('ytd-playlist-video-renderer .style-scope ytd-thumbnail-overlay-time-status-renderer') | |
| .map(e => e.textContent.trim().split(':').reverse()) | |
| .map(([s = '0', m = '0', h = '0']) => ({ s: parseInt(s), m: parseInt(m), h: parseInt(h) })) | |
| .map(({ s, m, h }) => s + m * 60 + h * 3600) | |
| .reduce((a, b) => a + b) / 3600 |
| $$('.runtimeLabel') | |
| .map(e => e.textContent.trim().replace('Length: ','')) | |
| .map(text => { | |
| const hasHours = text.includes('and') | |
| const [hText, mText] = hasHours | |
| ? text.split(' and ') | |
| : ['0 hrs', text] | |
| const h = Number.parseInt(hText) | |
| const m = Number.parseInt(mText) | |
| return h * 60 + m |
Download ringtones
https://github.com/yt-dlp/yt-dlp
yt-dlp -x --audio-format m4a --audio-quality 0 ...
# Ringtones should be no more then 35 seconds
mv *.m4a *.m4rScript was made for learning purposes
Please read terms curs.md: https://www.curs.md/ro/terms
How to add the function: https://developers.google.com/apps-script/guides/sheets
Rates are taken from: https://www.curs.md/ro/json_convertor_provider/default
Create alias manually in ~/.gitconfig file (recommened):
[alias]
gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f"
Create alias (problematic):
| (function bookmarksExportToCsv() { | |
| /** | |
| * 1. Export bookmarks from browser (supported any Chromium based browsers and Safari) (chrome://bookmarks) | |
| * 2. Open exported html file again in the browser | |
| * 3. Copy paste this entire file in console, and execute it (hit enter) | |
| * 4. You will be prompted to save a CSV file. Save it. | |
| * 5. Open Notion. Click Import -> CSV | |
| * 6. Select saved CSV file. Wait for import | |
| * 7. You have a new database with all your bookmarks | |
| */ |
| javascript: void ((function() { | |
| /* More bookmarklets at https://gist.github.com/iamandrewluca/61feacf07bc4f2f50e70f986c2e9b2d2 */ | |
| const styles = document.createTextNode(` | |
| /* Headers out of order (i.e. h2 before h1, etc.) */ | |
| /* Result: dotted blue outline */ | |
| /* https://twitter.com/Una/status/1277652897606635523 */ | |
| h2 ~ h1, | |
| h3 ~ h1, | |
| h4 ~ h1, | |
| h5 ~ h1, |
grep -rhosP "(?<=l10n\(\')([\w\.]+)(?=\'\))" src/
-r recursive in nested folders and files-h don't show file names-o print only matches-s silent errors-P activate advanced perl regex(?<=l10n\(\') must start with l10n(' but don't include in match