I hereby claim:
- I am curtisalexander on github.
- I am calex (https://keybase.io/calex) on keybase.
- I have a public key whose fingerprint is 095A 82B6 0C23 C6B6 966B 4FC1 9551 294F 845B BAE6
To claim this, I am signing this object:
open System.Net.Http | |
open System.IO | |
let downloadDataWithHttpClient (url: string) = | |
async { | |
use hc = new HttpClient() | |
// Just read the header | |
let! response = hc.GetAsync(url, HttpCompletionOption.ResponseHeadersRead) |> Async.AwaitTask | |
// if response.IsSuccessStatusCode | |
let filename = Path.GetTempFileName() |
# Description: Boxstarter Script | |
# Author: curtisalexander, forked from jessfraz | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: | |
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST> | |
# OR | |
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots | |
# | |
# Learn more: http://boxstarter.org/Learn/WebLauncher |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env zsh | |
# where to begin? | |
DIR="${HOME}/code" | |
cd "${DIR}" | |
echo | |
echo "Working from within ${PWD}" | |
echo |
--- | |
title: "R Markdown with Alternate Languages" | |
author: "Curtis Alexander" | |
output: | |
html_document: | |
include: | |
in_header: header.html | |
mathjax: null | |
params: | |
hilang: |
#!/usr/local/bin/Rscript --no-site-file --no-init-file --no-restore | |
# --vanilla ==> --no-site-file --no-init-file --no-restore --no-environ | |
# thus the above reads the .Renviron file(s) | |
## required packages == | |
# install.packages(c("docopt", | |
# "testthat")) | |
## docopt.org == |
@echo off | |
cls | |
C: | |
PATH C:\Program Files\R\R~\bin;%PATH% | |
:: pushd required in the event that the _watch-render-site.R or | |
:: _watch-render-rmd.R script is on a network drive | |
@pushd %~dp0 | |
:: reads .Renviron as it sets the environment variable RSTUDIO_PANDOC | |
:: which is the PATH to pandoc | |
cmd /c Rscript --no-site-file --no-init-file --no-restore _watch-render.R --patt=".+\.Rmd" |
#!/usr/local/bin/Rscript --no-site-file --no-init-file --no-restore | |
# --vanilla ==> --no-site-file --no-init-file --no-restore --no-environ | |
# thus the above reads the .Renviron file(s) | |
## required packages == | |
# install.packages(c("docopt", | |
# "testthat")) | |
## docopt.org == |
# for checking and installing packages | |
# extracted from CRAmisc package | |
# https://github.com/curtisalexander/CRAmisc/blob/master/R/install.R | |
check_install <- function(pkgs, repos = NULL, ...) { | |
installed_packages <- installed.packages()[ ,1] | |
for (i in seq_along(pkgs)) { | |
pkg <- pkgs[[i]] | |
if (!pkg %in% installed_packages) { | |
cat(paste0("Need to install: ", pkg, "\n")) | |
if(is.null(repos)) install.packages(pkg, repos = "https://cran.rstudio.com") |
# install (if applicable) | |
# install.packages(c("dplyr", | |
# "processx", | |
# "purrr", | |
# "readr")) | |
# libraries | |
suppressWarnings(suppressMessages(library("dplyr"))) | |
suppressWarnings(suppressMessages(library("processx"))) | |
suppressWarnings(suppressMessages(library("purrr"))) |