Skip to content

Instantly share code, notes, and snippets.

@b-rodrigues
b-rodrigues / nix_inputs.md
Created February 28, 2024 07:09 — forked from CMCDragonkai/nix_inputs.md
Understanding Nix Inputs #nix

Understanding Nix Inputs

Every Nix derivation produces a Nix store output that has 3 things:

  • Executables
  • Libraries
  • Data

Executables are always exported using the PATH environment variable. This is pretty much automatic.

@b-rodrigues
b-rodrigues / github-pages-custom-domain-gandi-dns-records.md
Created January 14, 2024 17:45 — forked from matt-bailey/github-pages-custom-domain-gandi-dns-records.md
How to set up DNS records on gandi.net to use a custom domain on Github Pages

How to set up DNS records on gandi.net to use a custom domain on Github Pages

You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.

Create the following A records:

@ 1800 IN A 185.199.108.153
@ 1800 IN A 185.199.109.153
@ 1800 IN A 185.199.110.153
get_counts <- function(dataset, var){
dataset %>%
group_by(am) %>%
mutate("change_{{var}}" := n_distinct({{var}})) %>%
mutate(total = across(starts_with("change"), identity)) %>%
mutate(total = unlist(total)) %>%
filter(total == 11) %>%
select(-total)
dput(sort(unique(as.character(tcltk::tkfont.families()))))
c("!Y2KBUG", "1980 Portable", "256 Bytes", "6809chargen", "Abberancy",
"Adobe Courier", "Adobe Helvetica", "Adobe New Century Schoolbook",
"Adobe Symbol", "Adobe Times", "Adobe Utopia", "Adriator", "Airmole",
"Airmole Antique", "Airmole Shaded", "Airmole Stripe", "Almonte",
"Almonte Snow", "Almonte Woodgrain", "Anglepoise Lampshade",
"Anklepants", "Arabic Newspaper", "Arnprior", "Astron Boy", "Astron Boy Video",
"Astron Boy Wonder", "Axaxax", "B&H Lucida", "B&H LucidaBright",
"B&H LucidaTypewriter", "Baby Jeepers", "BaileysCar", "Balker",
dput(sort(unique(as.character(tcltk::tkfont.families()))))
c("@Malgun Gothic", "@Malgun Gothic Semilight", "@Microsoft JhengHei",
"@Microsoft JhengHei Light", "@Microsoft JhengHei UI", "@Microsoft JhengHei UI Light",
"@Microsoft YaHei", "@Microsoft YaHei Light", "@Microsoft YaHei UI",
"@Microsoft YaHei UI Light", "@MingLiU-ExtB", "@MingLiU_HKSCS-ExtB",
"@MS Gothic", "@MS PGothic", "@MS UI Gothic", "@NSimSun", "@PMingLiU-ExtB",
"@SimSun", "@SimSun-ExtB", "@Yu Gothic", "@Yu Gothic Light",
"@Yu Gothic Medium", "@Yu Gothic UI", "@Yu Gothic UI Light",
"@Yu Gothic UI Semibold", "@Yu Gothic UI Semilight", "8514oem",
c("@Malgun Gothic", "@Malgun Gothic Semilight", "@Microsoft JhengHei",
"@Microsoft JhengHei Light", "@Microsoft JhengHei UI", "@Microsoft JhengHei UI Light",
"@Microsoft YaHei", "@Microsoft YaHei Light", "@Microsoft YaHei UI",
"@Microsoft YaHei UI Light", "@MingLiU-ExtB", "@MingLiU_HKSCS-ExtB",
"@MS Gothic", "@MS PGothic", "@MS UI Gothic", "@NSimSun", "@PMingLiU-ExtB",
"@SimSun", "@SimSun-ExtB", "@Yu Gothic", "@Yu Gothic Light",
"@Yu Gothic Medium", "@Yu Gothic UI", "@Yu Gothic UI Light",
"@Yu Gothic UI Semibold", "@Yu Gothic UI Semilight", "8514oem",
"Agency FB", "Algerian", "Arabic Transparent", "Arial", "Arial Baltic",
options(reactable.theme = reactable::reactableTheme(
color = "hsl(233, 9%, 87%)",
backgroundColor = "#002b36",
borderColor = "#eee8d5",
stripedColor = "#586e75",
highlightColor = "#6c71c4",
inputStyle = list(backgroundColor = "hsl(233, 9%, 25%)"),
selectStyle = list(backgroundColor = "hsl(233, 9%, 25%)"),
pageButtonHoverStyle = list(backgroundColor = "hsl(233, 9%, 25%)"),
pageButtonActiveStyle = list(backgroundColor = "hsl(233, 9%, 28%)")
Put this code below in a file called example_report.Rmd
---
title: "Report for `r params$country`"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
tufte::tufte_handout:
latex_engine: xelatex
params:
country: "country"
---
title: "The power of DRY"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
#rmarkdown::render("iwalk_script.Rmd")
library(dplyr)
library(forcats)
library(dplyr)
library(ggplot2)
library(lubridate)
library(COVID19)
covid <- covid19()
cases_deaths <- covid %>%
filter(iso_alpha_3 %in% c("AUT", "BEL", "BGR", "HRV",