Skip to content

Instantly share code, notes, and snippets.

View gederajeg's full-sized avatar
🎯
Focusing

Gede Primahadi Wijaya Rajeg gederajeg

🎯
Focusing
View GitHub Profile
@gederajeg
gederajeg / comment-box_r_notebook.txt
Created March 31, 2022 14:28
Comment box in R Markdown Notebook
See this StackOverflow thread for creating a comment box in .Rmd file:
https://stackoverflow.com/questions/47806200/create-a-comment-box-using-rmarkdown-html-file
@gederajeg
gederajeg / get-copy-of-older-file-git.txt
Last active December 28, 2024 10:21
Get a copy of an older version of a file from previous commit
git show <CompleteCommitHash>:path/to/oldfile.txt > path/to/newfile.txt
Source: https://stackoverflow.com/questions/59119921/use-git-to-restore-a-copy-of-some-old-files-while-keeping-their-latest-version
Source: https://stackoverflow.com/questions/71483126/copying-a-file-from-a-specific-commit-hash-from-one-repo-into-another-unrelated
Example:
git show "af0c0e7d2b163a05db2cfb0e7f7b785251a26fa0:contemporary-enggano-interlinear-text/processing-all-contemporary-texts-ELAN-FLEX-flextext-NEW-SFM.R" > contemporary-enggano-interlinear-text/processing-all-contemporary-texts-ELAN-FLEX-flextext-NEW-SFM-copy.R
@gederajeg
gederajeg / gist_to_github_repo.md
Created December 4, 2021 04:02 — forked from ishu3101/gist_to_github_repo.md
Transfer a gist to a GitHub repository

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown

Managing Gists Locally

by Danny Quah, May 2020

Through the Embed instruction or plugin, Gist snippets on GitHub can conveniently provide posts on Medium, WordPress, and elsewhere supplementary information (lines of code, images, Markdown-created tables, and so on). But while Gist snippets on GitHub can be managed directly via browser or through something like [Gisto][], a user might also wish to manipulate them offline. This last is for many of the same reasons that a user seeks to clone a git repo to their local filesystem, modify it locally, and then only subsequently push changes back up to GitHub.

Here's how to do this:

Create the gist on GitHub and then clone it to your local filesystem:

@gederajeg
gederajeg / rnotebook-font-size-and-font-family-setting.txt
Last active December 4, 2021 03:59
Define font family and font size for html output of R Notebook
Put the following CSS either in a .css file or directly in the R Notebook writing area.
<style type="text/css">
body{
font-family: Georgia;
font-size: 14pt;
}
</style>
### inspiration and source