Skip to content

Instantly share code, notes, and snippets.

View thomasp85's full-sized avatar
🎯
Something new and exciting

Thomas Lin Pedersen thomasp85

🎯
Something new and exciting
View GitHub Profile
@thomasp85
thomasp85 / styling.R
Created February 26, 2019 19:59
Single-quote styler
transformers <- styler::tidyverse_style()
transformers$token$fix_quotes <- function (pd_flat) {
str_const <- pd_flat$token == 'STR_CONST'
str_const_change <- grepl('^"(.*)"$', pd_flat$text[str_const])
raw_str <- sub('^"(.*)"$', '\\1', (pd_flat$text[str_const][str_const_change]))
raw_str <- gsub('(\\\\)?\'', '\\\\\'', raw_str)
raw_str <- gsub('\\\\"', '"', raw_str)
pd_flat$text[str_const][str_const_change] <- paste0('\'', raw_str, '\'')
pd_flat
}
/* rs-theme-name: Idle Eyes */
/* rs-theme-is-dark: TRUE */
.ace_gutter {
background: #3b3b3b;
color: rgb(153,153,153)
}
.ace_print-margin {
width: 1px;
background: #555;
}
@thomasp85
thomasp85 / celebration2020.Rmd
Last active November 25, 2021 19:49
Code and exercises for the celebRation2020 ggplot2 workshop
---
title: "ggplot2 examples and exercises"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
This document contains all the code that is displayed during the workshop. The
@thomasp85
thomasp85 / gist:7a13df82e4d6947eac20bccc46fd061f
Created January 17, 2022 10:37
tzprofiles verification
I am attesting that this GitHub handle thomasp85 is linked to the Tezos account tz2Pkj2xWJovKKCsABjnr3NbyMVJTMBkpTvb for tzprofiles
sig:spsig1Ehb3tCbCP8GEJnhztgv2fSLaSk2HYnNfuC5TczfrPC6DsXfqGNpiSPxj6PjyK3Z4hrQgbegczwP6GEek8HirA9FzoRGK9