Skip to content

Instantly share code, notes, and snippets.

View lnnrtwttkhn's full-sized avatar

Lennart Wittkuhn lnnrtwttkhn

View GitHub Profile
@lnnrtwttkhn
lnnrtwttkhn / git-resources.md
Last active January 20, 2023 20:14
Resources for learning Git
@ozika
ozika / datalad_setup.md
Last active August 31, 2022 12:26
Setting up datalad dataset (core steps)
  • add locking

requirements

create data set from a folder

datalad create -f [folder]

to ignore a folder you can use

.gitignore

@ozika
ozika / analyze_git_disk_usage.sh
Created March 2, 2021 09:41
analyze file sizes in git
git rev-list --objects --all |
git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' |
sed -n 's/^blob //p' |
sort --numeric-sort --key=2 |
cut -c 1-12,41- |
$(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
@lnnrtwttkhn
lnnrtwttkhn / delete_git_submodule.md
Last active May 27, 2020 15:09 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule <name>"
  • Delete the now untracked submodule files rm -rf path_to_submodule
@KevCaz
KevCaz / myPackages.R
Last active April 27, 2021 09:12
My list of R packages that have no debian package
# Packages installed via apt-get packages
# apt-get install r-cran-v8
# apt-get install "r-cran-rcpp.*" r-cran-reticulate r-cran-rjava r-cran-devtools r-cran-doparallel r-cran-sf r-cran-lwgeom r-cran-lme4 r-cran-ade4 r-cran-ape r-cran-vegan r-cran-igraph r-cran-rgl r-cran-webshot r-cran-cli r-cran-pillar r-cran-taxize r-cran-repr r-cran-reprex r-cran-biocmanager
# r-cran-plotly r-cran-cairodevice
# CRAN packages - complement the list of packages installed via apt-get
install.packages(
c(
"bipartite",
"blogdown",
"bookdown",
@joyrexus
joyrexus / README.md
Last active February 23, 2026 21:18
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@viegelinsch
viegelinsch / revealjs_as_submodule.md
Created November 29, 2016 14:43
Using reveal.js as presentation framework for learning resources
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@jennybc
jennybc / reverse-categorical-axis-ggplot2.r
Created October 10, 2014 01:06
Reverse the order of a categorical axis in ggplot2
scale_x_discrete(limits = rev(levels(the_factor)))
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream