Skip to content

Instantly share code, notes, and snippets.


Jeff Allen trestletech

View GitHub Profile
trestletech / integration-testing.Rmd
Last active Nov 4, 2019
Integration testing vignette for the Shiny Dev center.
View integration-testing.Rmd
title: "Integration Testing in Shiny"
output: github_document
chunk_output_type: console
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
trestletech / Vagrantfile
Last active Sep 24, 2019
Ubuntu 18.04 Vagrantfile with RStudio Desktop installed and arbitrary version of R (via r-builds). user/pass is `vagrant:vagrant`
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
View app.R
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
# Find out more about building applications with Shiny here:

Keybase proof

I hereby claim:

  • I am trestletech on github.
  • I am trestletech ( on keybase.
  • I have a public key whose fingerprint is DC6E 66E5 1FD7 E7DD 48F3 30DC F444 9D7D 7C8B 4C37

To claim this, I am signing this object:

trestletech / analysis.R
Last active Jul 7, 2017
Tidying of pressure-sensitive keystroke dynamics data. Raw available: . The `isJA` column represents whether or not the user currently typing is "Jeffrey Allen" -- i.e. is the user typing his own name (TRUE) or someone else's (FALSE)?
View analysis.R
download.file("", "")
words <- readr::read_csv("KSP-Word.csv")
users <- readr::read_csv("KSP-User.csv")
entries <- readr::read_csv("KSP-Entry.csv")
keypress <- readr::read_csv("KSP-KeyPress.csv")
pressure <- readr::read_csv("KSP-Pressure.csv")
trestletech /
Created Jun 15, 2016
Get all EC2 Instance Types in All Availability Zones
echo "Getting list of Availability Zones"
all_regions=$(aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]' | sort)
while read -r region; do
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort)
while read -r az; do
trestletech / .gitignore
Last active Jun 2, 2016
node-authenticate-pam crash
View .gitignore
trestletech / enc.R
Created Jan 19, 2016
encrypting arbitrary amounts of data in R using PKI
View enc.R
txt <- ("This is an encryption test that has a variety of characters and is fairly long so that we can test whether or not it's actually using the stream cipher")
corpus <- paste(rep(txt, 5000), collapse="")
x <- charToRaw(corpus)
key <- PKI.digest(charToRaw("this is a small key but it's getting bigger by the second"), "SHA256")
ae <- PKI.encrypt(x, key, "aes256")
ad <- PKI.decrypt(ae, key, "aes256")
stopifnot(identical(x, ad))
stopifnot(!identical(ad, ae))
View inheritance-argument-trouble.R
# Suppose a function has an argument "x". If a "child function" has multiple
# argument beginning with "x" and I want to pass the param "x" to its parent,
# I get error: `argument n matches multiple formal arguments`
# The reason this happens is clear, but at 3am my brain is firing blanks
# trying to find a solution. Help!
foo <- function(x, ...) UseMethod("foo")
foo.parent <- function(x, n = 5, ...) n
View Dockerfile
FROM ubuntu:14.04
MAINTAINER Winston Chang ""
# =====================================================================
# R
# =====================================================================
# Need this to add R repo
RUN apt-get update && apt-get install -y software-properties-common