Skip to content

Instantly share code, notes, and snippets.

View sbalci's full-sized avatar
πŸ”¬
πŸ”¬πŸ‘€πŸ“‘πŸ—ƒπŸ“ŠπŸ¨πŸ—„πŸ“‡πŸ“–βš—πŸ“πŸŽΆπŸ“ˆπŸ“‰πŸ“ƒπŸ–πŸ”¬πŸ”¬πŸ‹πŸ»β€β™‚πŸš΄πŸ»β€β™‚πŸš™πŸ‘¨β€πŸ’»πŸ€·β€β™‚πŸ“ΈπŸ“ΊπŸŽ›πŸ”­πŸ”¬πŸ’ŠπŸ”πŸ«πŸŒΈ

Serdar BalcΔ± sbalci

πŸ”¬
πŸ”¬πŸ‘€πŸ“‘πŸ—ƒπŸ“ŠπŸ¨πŸ—„πŸ“‡πŸ“–βš—πŸ“πŸŽΆπŸ“ˆπŸ“‰πŸ“ƒπŸ–πŸ”¬πŸ”¬πŸ‹πŸ»β€β™‚πŸš΄πŸ»β€β™‚πŸš™πŸ‘¨β€πŸ’»πŸ€·β€β™‚πŸ“ΈπŸ“ΊπŸŽ›πŸ”­πŸ”¬πŸ’ŠπŸ”πŸ«πŸŒΈ
View GitHub Profile
@sbalci
sbalci / delete_git_submodule.md
Created January 11, 2022 16:49 — 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 "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@sbalci
sbalci / index.html
Created December 25, 2021 17:50
Simple Sidebar
<div id="sidebar1" class="sidebar" aria-label="Main sidebar containing navigation links and some information" aria-hidden="true">
<div class="sidebar__content">
<span>whatever you want</span>
</div>
</div>
<button data-toggle-sidebar="sidebar1">Toggle Sidebar</button>
@sbalci
sbalci / index.html
Created December 25, 2021 17:39
Simple Sidebar that pushes content
<div id="sidebar" class="collapsed">
</div>
<div id="content">
<button title="Toggle sidebar"></button>
<h3>Some content</p>
</div>
@sbalci
sbalci / cloudSettings
Last active December 14, 2021 20:18
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-12-14T20:18:18.838Z","extensionVersion":"v3.4.3"}
@sbalci
sbalci / readme.md
Created October 2, 2021 19:51 — forked from Menencia/readme.md
Script to update a git project

Update a git repo

With this script, you can easily update a git repo.

Install

curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/update.sh > update.sh
curl -# https://gist.githubusercontent.com/Menencia/6435756/raw/version.sh > version.sh
@sbalci
sbalci / github.R
Created September 11, 2021 19:47 — forked from z3tt/github.R
Configure GitHub for Rstudio
#### 1. Sign up at GitHub.com ################################################
## If you do not have a GitHub account, sign up here:
## https://github.com/join
# ----------------------------------------------------------------------------
#### 2. Install git ##########################################################
## If you do not have git installed, please do so:
# find all Rmd files in R projects
list_Rmd_files <- dir(here::here(), pattern = "*.Rmd")
exclude_Rmd_files <-
dir(here::here(), pattern = "^_|references|other")
list_Rmd_files <-
list_Rmd_files[!(list_Rmd_files %in% exclude_Rmd_files)]
# unname and rename all chunks in R project
purrr::map(
.x = list_Rmd_files,
.f = namer::unname_all_chunks
)
purrr::map(
.x = list_Rmd_files,
.f = namer::name_chunks
)
# batch rename files
Book1 <- read.csv(file.choose())
wd <- dirname(file.path(file.choose()))
for (i in 1:dim(Book1)[1]) {
oldfilepath <- paste0(wd, "/", Book1[i,2])
# find all Rmd files in R projects
list_Rmd_files <- dir(here::here(), pattern = "*.Rmd")
exclude_Rmd_files <-
dir(here::here(), pattern = "^_|references|other")
list_Rmd_files <-
list_Rmd_files[!(list_Rmd_files %in% exclude_Rmd_files)]