Skip to content

Instantly share code, notes, and snippets.

View danielvartan's full-sized avatar

Daniel Vartanian danielvartan

View GitHub Profile
@danielvartan
danielvartan / parse_html_table.R
Last active February 22, 2025 19:04
Parse HTML tables using `rvest`
# library(clipr)
# library(prettycheck) # github.com/danielvartan/prettycheck
# library(rvest)
parse_html_table <- function(x = clipr::read_clip()) {
prettycheck:::assert_character(x)
x |>
paste0(collapse = " ") |>
rvest::read_html() |>
@danielvartan
danielvartan / ffmeg-cut-video.sh
Last active April 10, 2025 00:21
Learn more abou FFMEG at: https://www.ffmpeg.org
# Source: https://stackoverflow.com/a/42827058/8258804
ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4
@danielvartan
danielvartan / .Rprofile
Last active April 27, 2025 03:01
My `.Rprofile` settings.
# Load packages -----
library(magrittr)
library(ragg)
# Set options -----
options(scipen = 999)
options(vsc.use_httpgd = TRUE)
@danielvartan
danielvartan / find_orphan_files.R
Last active May 7, 2025 23:53
Find orphan files in a Zotero database.
# This funtion was moved to the `rutils` R package.
# Learn more at <https://danielvartan.github.io/rutils/reference/find_orphan_files.html>.