Skip to content

Instantly share code, notes, and snippets.

View Aariq's full-sized avatar
🍵

Eric R. Scott Aariq

🍵
View GitHub Profile
#### ---------------------------------------------
## Edit via: RStudio > Tools > Edit Code Snippets
# Released under a MIT license
snippet fragment
[${1:text}]{.${2:type}}
snippet aside
[${1:text}]{.aside}
@briandk
briandk / rstudioconf2022-presentation-links.md
Last active July 27, 2022 15:57
List of links related to my rstudio::conf 2022 presentation on designing a socially critical data science course
@billspat
billspat / nsfbadger.R
Last active May 13, 2021 14:27
NSF badge maker!
# Make NSF award badges for your github readme or Markdown-based website!
nsf_badges <- function(award_id) {
nsf_button_template="[![NSF-{award_id}](https://img.shields.io/badge/NSF-{award_id}-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID={award_id})]"
badges<- stringr::str_glue(nsf_button_template)
return(paste(badges, collapse = ' ') )
}
@kellobri
kellobri / persistent-read-example.Rmd
Created April 18, 2019 21:06
Example of R Markdown documents that read/write data to a top-level persistent storage directory on RStudio Connect
---
title: "Read Persistent Data on RStudio Connect"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
@benmarwick
benmarwick / super-and-sub-script-labels.R
Last active April 11, 2024 23:09
ggplot axis labels with superscript and subscript
library(tidyverse)
# using expression() for the text formatting:
ggplot(mtcars,
aes(disp,
mpg)) +
geom_point() +
# ~ for spaces, and * for no-space between (unquoted) expressions
ylab(expression(Anthropogenic~SO[4]^{"2-"}~(ngm^-3))) +
xlab(expression(italic(delta)^13*C[ap]*"‰")) +
@gadenbuie
gadenbuie / join-animations-with-gganimate.R
Last active January 11, 2022 15:48
Animated dplyr joins with gganimate
# Animated dplyr joins with gganimate
# * Garrick Aden-Buie
# * garrickadenbuie.com
# * MIT License: https://opensource.org/licenses/MIT
# Note: I used Fira Sans and Fira Mono fonts.
# Use search and replace to use a different font if Fira is not available.
library(tidyverse)
library(gganimate)
@protrolium
protrolium / terminal-gif.md
Last active June 9, 2024 18:08
convert images to GIF in Terminal

Install ImageMagick

brew install ImageMagick

Pull specific region of frames from video file w/ ffmpeg

ffmpeg -ss 14:55 -i video.mkv -t 5 -s 480x270 -f image2 %04d.png

  • -ss 14:55 gives the timestamp where I want FFmpeg to start, as a duration string.
  • -t 5 says how much I want FFmpeg to decode, using the same duration syntax as for -ss.
  • -s 480x270 tells FFmpeg to resize the video output to 480 by 270 pixels.
  • -f image2 selects the output format, a series of still images — make sure there are leading zeros in filename.
@eriwen
eriwen / pretty_thunderbird_labels.css
Created December 29, 2010 00:12
userChrome.css snippet for Thunderbird to have pretty labels
/* Default Important Label */
treechildren::-moz-tree-cell(lc-FF0000) {
border-bottom: 1px solid #FF0000 !important; background-color: #FFCCCC !important;
}
treechildren::-moz-tree-cell-text(lc-FF0000) {
color: #000000 !important;
}
treechildren::-moz-tree-cell(lc-FF0000, selected) {
background-color: #FF0000 !important;
}