Skip to content

Instantly share code, notes, and snippets.

View vfulco's full-sized avatar

Vincent C Fulco vfulco

  • Weisisheng Corporate Management Consulting (Shanghai) Ltd.
  • Shanghai, China
View GitHub Profile
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
css:
- default
@joshkatz
joshkatz / sotu.R
Created January 31, 2018 15:49
State of the Union WPM chart
needs(rvest, tidyverse, zoo)
df <- c('minutes', 'words') %>%
map(function(var) {
doc <- var %>%
sprintf(fmt = 'http://www.presidency.ucsb.edu/sou_%s.php') %>%
read_html()
doc %>%
html_node('table tr:nth-of-type(2) table') %>%
html_table(fill = T) %>%
library(jsonlite)
library(ggplot2)
library(ggChernoff)
# https://github.com/Bowserinator/Periodic-Table-JSON
d <- jsonlite::fromJSON('PeriodicTableJSON.json')[["elements"]]
ggplot(d, aes(xpos,10-ypos)) +
geom_chernoff(aes(fill=category, size = phase, smile = density, brow = molar_heat)) +
geom_text(aes(label=symbol), vjust=2.5) +
---
title: "R で音声入りのスライドを作る"
author: "@y__mattu"
date: "データ解析備忘録"
output:
xaringan::moon_reader:
css: "for_xaringan.css"
nature:
highlightStyle: github
highlightLines: true
@woudsma
woudsma / portainer-dokku.md
Last active May 7, 2023 23:04
TLS secured TCP exposed Docker daemon on Dokku host - setup

TLS secured TCP exposed Docker daemon on Dokku host - setup

  1. Create certificates
  2. Edit Docker options
  3. Restart Docker
  4. Copy client certificates from host
  5. (optional) Add remote endpoint in Portainer

Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.


@mnazarov
mnazarov / docx_flextable.Rmd
Last active March 1, 2018 23:59
Use flextable with rmarkdown for Word (docx) output
---
title: "Insert `flextable`s into Word documents generated with `rmarkdown`"
author: Maxim Nazarov
output:
word_document:
keep_md: yes
html_document:
keep_md: yes
smart: false
---
@CateGitau
CateGitau / Twitter text analysis.R
Last active January 18, 2023 18:26
Analyzing twitter data using R
#install required packages
install.packages("twitteR")
install.packages("RCurl")
install.packages("httr")
install.packages("devtools")
install.packages(toInstall, repos = "http://cran.r-project.org")
library(devtools)
#Load necessary packages
library(twitteR)
library(shinydashboard)
library(dplyr)
library(dbplyr)
library(purrr)
library(shiny)
library(highcharter)
library(DT)
library(htmltools)
# Use the `config` package to get the credentials
``` r
library(extrafont)
#> Registering fonts with R
# font_install('fontcm') # try this if its not working
suppressMessages(loadfonts())
# check that the LM Roman fonts are installed with
"CM Roman" %in% fonts()
#> [1] TRUE
# main script ============
@agberg
agberg / printing_flexdashboard_with_webshot
Last active November 16, 2020 21:28
Using Webshot to "Print" Flexdashboards
This gist holds the files necessary to reproduce a minimal example of "printing" a flexdashboard using a headless browser.