Skip to content

Instantly share code, notes, and snippets.

View cderv's full-sized avatar

Christophe Dervieux cderv

View GitHub Profile
@cderv
cderv / map_flat_use_case.R
Created May 7, 2018 23:04
map_flat usage examples
#' ---
#' output:
#' md_document:
#' pandoc_args: [
#' '-f', 'markdown-implicit_figures',
#' '-t', 'commonmark',
#' --wrap=preserve
#' ]
#' ---
#'
@cderv
cderv / notes.md
Created May 13, 2018 14:46
Various notes on dev tools

Travis

  • Change for open source repo - see blog post

codecov

@cderv
cderv / demo_reprex.md
Created September 29, 2018 14:24
A demo of posting a reprex
@cderv
cderv / time.h
Created September 30, 2018 20:11
trying to debug anytime conversion
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _TIME_H_
#define _TIME_H_
#include <crtdefs.h>
@cderv
cderv / get_prev.R
Last active October 22, 2020 17:06
données bison futé
res <- jsonlite::fromJSON("http://www.bison-fute.gouv.fr/previsions/previsions.json")
library(tidyverse)
prev_bf <- tibble(
days = res$days,
depts = list(res$deptsLine[1:94]),
depart = map(res$values, ~ strsplit(.x[1:94], split = ",")) %>% modify_depth(2, 1) %>% simplify_all(),
retour = map(res$values, ~ strsplit(.x[1:94], split = ",")) %>% modify_depth(2, 2) %>% simplify_all()
) %>%
unnest()
prev_bf
@cderv
cderv / ignored_qa.txt
Last active October 22, 2020 17:06
ignored QA questions
https://stackoverflow.com/questions/10646665/how-to-convert-r-markdown-to-html-i-e-what-does-knit-html-do-in-rstudio-0-9
https://stackoverflow.com/questions/22081991/rmarkdown-pandoc-pdflatex-not-found
https://stackoverflow.com/questions/16172345/how-can-i-use-emacs-ess-mode-with-r-markdown
https://stackoverflow.com/questions/37241578/knitr-getting-a-parse-all-error-in-r-when-converting-rmd-file-into-html
https://stackoverflow.com/questions/33913780/internal-links-in-rmarkdown-dont-work
https://stackoverflow.com/questions/31214524/how-do-i-produce-r-package-vignettes-in-multiple-formats
https://stackoverflow.com/questions/25382459/rmarkdown-error-in-yaml
https://stackoverflow.com/questions/45228938/beamer-rmarkdown-changing-slide-count-for-backup-slides
https://stackoverflow.com/questions/25599860/how-to-increase-stack-space-overflow-for-pandoc-in-r
https://stackoverflow.com/questions/27246746/how-to-replicate-knit-html-in-a-command-line
@cderv
cderv / Interesting_stuff.md
Created November 18, 2018 11:12
Various Stuff to remember
@cderv
cderv / print-pdf-for-paged-js.md
Last active October 22, 2020 17:06
How puppeeter works ?

inspired from https://gitlab.pagedmedia.org/tools/pagedjs-cli/blob/master/index.js

This implement a Printer class that extend EventEmitter which does:

  1. browser = puppeteer.launch()
  2. page = browser.newPage()
  3. Serving the paged html locally
    • /print the website
    • /polyfill les scripts js
  4. page.goto(http://localhost:${port}/print/${basename}) locally served files