Code Snippets
Nux
Rename all files sequentially
The example renames .jpg files. Modify as per your need.
To start numbering at certain number use the following code
For more on this, look here
Rename file names (“_” to “-”
Modify as per need
Replace space with hyphen
Rename to lowercase
Count files
Replace new line with double new line
Convert all mp4 to mp3
Latex
Long Comment
Restart Page-numbering
Push contents to bottom/right of page
R
Quit R from terminal in one go
or quit(save = "no")
Git
Undoing commit
Undoes the last N commits, but keeps the changes in the staging area.
Undoes the last N commits, and unstages the changes, leaving them in the working directory.
Undoes the last N commits and discards all changes made in those commits from the working directory. Use with caution as this is a destructive operation.
Rename files with git
Pull if remote is ahead
Revert all tracked files in the working directory
To clean untracked files as well:
Repository-specific confiuguration
Global confiuguration
Quarto
Render all qmd files in the directory
Excel / Google Sheet
Mode for ordinal data
Median for ordinal data
=INDEX({"Strongly Disagree","Disagree","Neither Agree nor Disagree","Agree","Strongly Agree"}, MEDIAN(FILTER(MATCH(I1:I106, {"Strongly Disagree","Disagree","Neither Agree nor Disagree","Agree","Strongly Agree"}, 0), ISNUMBER(MATCH(I1:I106, {"Strongly Disagree","Disagree","Neither Agree nor Disagree","Agree","Strongly Agree"}, 0)))))