Skip to content

Instantly share code, notes, and snippets.

@unrevised6419
unrevised6419 / youtube-dl.md
Last active April 13, 2025 14:45
ringtone youtube audio
@unrevised6419
unrevised6419 / README.md
Last active September 5, 2023 21:16
curs.md google function
@unrevised6419
unrevised6419 / README.md
Last active June 7, 2025 07:57
Instant Markdown editor

Instant Markdown editor in new tab

  1. Create a new bookmark
  2. To the link add data:text/html,
  3. After data:text/html, paste block below
  4. Save bookmark, and open it

First time it may take a while to load the library

@unrevised6419
unrevised6419 / git-reset-author.sh
Last active December 1, 2021 15:52
Change commit author using a rebase
git rebase -x "git commit --amend --reset-author --no-edit" main
@unrevised6419
unrevised6419 / GONE.md
Last active November 4, 2021 09:18
Git alias to remove all local branches that are gone on remote

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):

@unrevised6419
unrevised6419 / bookmarks-to-notion.js
Last active March 26, 2025 04:06
Export bookmarks to Notion as a Database
(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
*/
@unrevised6419
unrevised6419 / headings-out-of-order.js
Last active June 29, 2020 17:55
Will outline headings out of order in a page (from https://twitter.com/Una/status/1277652897606635523) #bookmarklet
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,
@unrevised6419
unrevised6419 / README.md
Last active August 6, 2019 15:58
Grep l10n labels from project
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
  • (?&lt;=l10n\(\') must start with l10n(' but don't include in match
@unrevised6419
unrevised6419 / oss-tools.md
Last active August 8, 2024 00:19
Open source software tools
@unrevised6419
unrevised6419 / top-commands.sh
Last active December 1, 2024 12:02
Show top 10 commands most used
history 1 | awk '{print $2}' | sort | uniq -ci | sort -gr | head -n 10