Skip to content

Instantly share code, notes, and snippets.

Alan Dipert alandipert

Block or report user

Report or block alandipert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View leafletbm.R
# https://gist.github.com/keberwein/05f633a2be293b01b52bf05553d24b93
# http://eric.clst.org/tech/usgeojson/
# https://rstudio.github.io/leaflet/choropleths.html
library(dplyr)
library(leaflet)
library(maptools)
library(rgdal)
library(rgeos)
library(scales)
View emacs_vim.Rmd
---
title: "Editing with vim keys in RStudio"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Intro
View sysup.log
prt-get: updating /usr/ports/opt/rust
=======> Building '/usr/ports/opt/rust/rust#1.33.0-1.pkg.tar.gz'.
bsdtar -p -o -C /usr/ports/opt/rust/work/src -xf /usr/ports/opt/rust/rustc-1.33.0-src.tar.gz
bsdtar -p -o -C /usr/ports/opt/rust/work/src -xf /usr/ports/opt/rust/rust-std-1.32.0-x86_64-unknown-linux-gnu.tar.gz
bsdtar -p -o -C /usr/ports/opt/rust/work/src -xf /usr/ports/opt/rust/rustc-1.32.0-x86_64-unknown-linux-gnu.tar.gz
bsdtar -p -o -C /usr/ports/opt/rust/work/src -xf /usr/ports/opt/rust/cargo-0.33.0-x86_64-unknown-linux-gnu.tar.gz
[llvm]
ninja = true
targets = "X86"
experimental-targets = ""
@alandipert
alandipert / app.R
Created Apr 1, 2019
networkD3 test app
View app.R
library(networkD3)
library(shiny)
library(shinydashboard)
ui = dashboardPage(
dashboardHeader(title = "networkD3 tests"),
dashboardSidebar(
sidebarMenu(
dateRangeInput(inputId = "dates",
label = "Select time period:",
@alandipert
alandipert / Makefile
Last active Mar 29, 2019
libsass Makefile compatible with GNU Make 3.79.1
View Makefile
OS ?= $(shell uname -s)
CC ?= cc
CXX ?= c++
RM ?= rm -f
CP ?= cp -a
MKDIR ?= mkdir
RMDIR ?= rmdir
WINDRES ?= windres
# Solaris/Illumos flavors
# ginstall from coreutils
View scaffold_utils.R
slurp <- function(file) {
paste(readLines(
system.file(file, package = 'reactR')
), collapse = "\n")
}
# invoke file.edit in a way that will bind to the RStudio editor
# when running inside RStudio
fileEdit <- function(file) {
fileEditFunc <- eval(parse(text = "file.edit"), envir = globalenv())
@alandipert
alandipert / colorpicker.R
Last active Feb 22, 2019
Example of reactR input helpers
View colorpicker.R
picker_types <- c(
"sketch",
"alpha",
"block",
"chrome",
"circle",
"compact",
"github",
"hue",
"material",
View .vimrc
syntax on
colorscheme koehler
filetype plugin indent on
" Highlight trailing whitespace
" http://vim.wikia.com/wiki/Highlight_unwanted_spaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
View foob.lisp
(defun foob ()
(format t "foob!~%"))
View app.R
library(shiny)
ui <- fluidPage(
tags$p(textOutput("user"))
)
with_mock_user <- function(server_func, username) {
function(input, output, session) {
if (Sys.getenv("RSTUDIO") == "1") {
# On RSP: mock session$user
You can’t perform that action at this time.