❯ usethis::use_pkgdown_travis()
✔ Setting active project to '/Users/gaborcsardi/works/ps'
✔ Adding 'docs/' to '.gitignore'
● Set up deploy keys by running `travis::use_travis_deploy()`
● Insert the following code in '.travis.yml'
before_cache: Rscript -e 'remotes::install_cran("pkgdown")'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Generate a bibliography of packages | |
#' | |
#' This function creates an output bibliography from an input character vector | |
#' of package names. The primary use case for this function is when working | |
#' with other authors and you need to provide a reference list of packages used. | |
#' | |
#' @param pkgs A character vector of packages | |
#' @param csl A csl file used to format the output bibliography. Good place to | |
#' look for these is \url{https://github.com/citation-style-language/styles} | |
#' @param append_bib Existing \code{.bib} file to append package citations to. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidygraph) | |
library(particles) | |
library(jsonlite) | |
library(magick) | |
# Prepare text polygons | |
text <- read_json('text.json') | |
par_text <- text$layers[[3]]$paths | |
on_text <- text$layers[[2]]$paths | |
cran_text <- text$layers[[1]]$paths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(magick) | |
library(reshape2) | |
library(dplyr) | |
library(tidygraph) | |
library(particles) | |
library(animation) | |
plot_fun <- function(sim) { | |
df <- as_tibble(sim) | |
plot(df$x, df$y, col = df$color, pch = '.', axes = FALSE, xlim = c(-100, 317), ylim = c(-268, 100), xlab = NA, ylab = NA) |
- Place homebrewupdate.sh where ever you like, I use ~/bin/homebrewupdate.sh
- Place the .plist file in ~/Library/LaunchAgents and update the path to your bash script
- run
launchctl load ~/Library/LaunchAgents/com.jb510.homebrewupdate.plist
or whatever you've named your plist file. - check
launchctl list | grep jb510
to see that it's running
Note: You might need to chmod +x homebrewupdate.sh
Note 2: you can run this manually to test your script ~/bin/homebrewupdate.sh
Future: Update this to also update casks https://github.com/buo/homebrew-cask-upgrade or using brew cask list | xargs brew cask reinstall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Installs the latest RStudio daily desktop build for OSX/macOS and Ubuntu(amd64) | |
# | |
# https://support.rstudio.com/hc/en-us/articles/203842428-Getting-the-newest-RStudio-builds | |
set -e | |
install_macos_daily() { | |
REDIRECT_URL="https://www.rstudio.org/download/latest/daily/desktop/mac/RStudio-latest.dmg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(doParallel) | |
rpts <- list(list(out="one.html", params=list(some_var="One")), | |
list(out="two.html", params=list(some_var="Two")), | |
list(out="three.html", params=list(some_var="Three")), | |
list(out="four.html", params=list(some_var="Four"))) | |
do_rpt <- function(r) { | |
require(rmarkdown) |
-
iTerm2
-
Command Line Tools
xcode-select –install