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
// ==UserScript== | |
// @name Genius Lyrics Copier | |
// @namespace genius-lyrics-copier | |
// @version 1 | |
// @description Adds a button to copy lyrics from Genius website to clipboard | |
// @match https://genius.com/* | |
// @grant GM_setClipboard | |
// @noframes | |
// ==/UserScript== |
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
jupyter nbconvert --stdout --no-prompt --to script notebook.ipynb | grep -Ev '^\s*\(*[a-zA-Z0-9_\.,\s]+\)*\s*$' |
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
// https://stackoverflow.com/a/23013726/13727176 | |
function swap(obj) { | |
const ret = {}; | |
for (const key in obj) { | |
ret[json[key]] = key; | |
} | |
return ret; | |
} |
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
snippet imfn | |
```{r, echo=F} | |
# This is a custom function I wrote for showing images | |
# It is more robust than embedding images in R markdown directly | |
# With imgs embedded in R markdown, compilation of whole document fails if img missing | |
# This function also displays the image if possible and just logs an error otherwise | |
# Under the hood, knitr::include_graphics() is used, which also accepts multiple image paths as parameter | |
# Therefore, with this function, side-by-side images are also supported | |
# We then need to pass a vector of paths in the function call and add fig.show='hold' to the code cell |
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
# Search for pattern in PDFs inside current folder (and subfolders, recursively) | |
pdfgrep pattern $(find -name '*.pdf' | sort) |
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
snippet imfn | |
```{r, echo=F} | |
# This is a custom function I wrote for showing images | |
# It is more robust than embedding images in R markdown directly | |
# With imgs embedded in R markdown, compilation of whole document fails if img missing | |
# This function also displays the image if possible and just logs an error otherwise | |
# Under the hood, knitr::include_graphics() is used, which also accepts multiple image paths as parameter | |
# Therefore, with this function, side-by-side images are also supported | |
# We then need to pass a vector of paths in the function call and add fig.show='hold' to the code cell |
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
{"lastUpload":"2021-03-24T16:57:43.413Z","extensionVersion":"v3.4.3"} |