Skip to content

Instantly share code, notes, and snippets.

View yusbk's full-sized avatar
🧷
rehat2

YBK yusbk

🧷
rehat2
View GitHub Profile

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@yusbk
yusbk / academic.el
Created May 30, 2022 21:24 — forked from rka97/academic.el
Configuration I use in Doom Emacs as part of my academic reading/notetaking workflow
;; The following packages are needed:
;; 1. elfeed and elfeed-score (available from the rss doom module)
;; 2. citar
;; 3. org-ref
;; 4. org-roam and org-roam-bibtex
(defconst robo/bib-libraries (list "~/bib-lib/robo-lib.bib" "~/bib-lib/robo-temp-lib.bib")) ; All of my bib databases.
(defconst robo/main-bib-library (nth 0 robo/bib-libraries)) ; The main db is always the first
(defconst robo/main-pdfs-library-paths `("~/bib-lib/pdfs/" "/home/robo/bib-lib/temp-pdfs/")) ; PDFs directories in a list
@yusbk
yusbk / data.table-joins.R
Created March 29, 2022 22:57 — forked from nacnudus/data.table-joins.R
How to do joins with data.table
library(data.table)
?`[.data.table`
DT <- data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9)
X <- data.table(x=c("c","b"), v=8:7, foo=c(4,2))
colnames(DT)
# [1] "x" "y" "v"
@yusbk
yusbk / conventional_commit_messages.md
Created December 11, 2020 23:43 — forked from qoomon/conventional-commits-cheatsheet.md
Conventional Commit Messages

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@yusbk
yusbk / gist:ec4b385b05b6d911a8a2e72ade3f2954
Created March 28, 2019 22:03
Change language repeat_header_text
kable(tabell.md, format = "latex", longtable = TRUE, booktabs = TRUE) %>%
kable_styling(latex_options = c("repeat_header"), repeat_header_text = c("\\textit{(fortsettelsen)}")) %>%
add_header_above(c("", "", "Andel per diagnoser (%)" = colnr)) %>%
column_spec(1, bold = T) %>%
column_spec(2, italic = T) %>%
collapse_rows(columns = 1)