Skip to content

Instantly share code, notes, and snippets.

📖
Writing a book

Yihui Xie yihui

📖
Writing a book
Block or report user

Report or block yihui

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 server.R
xy = matrix(0.5, 1, 2)
shinyServer(function(input, output) {
output$myplot = renderPlot({
hover = input$myplot_hover
if (!is.null(hover))
xy <<- rbind(xy, c(hover$x, hover$y))
par(mar = rep(0, 4))
plot.new()
points(xy, pch = rep(c(21, 19), c(nrow(xy) - 1, 1)))
box()
@yihui
yihui / github-upload
Created May 1, 2012 — forked from wereHamster/README.md
Script to upload files to github: ./github-upload <file> [<repo>]
View github-upload
#!/usr/bin/env ruby
# under Ubuntu, you should install ruby1.9.1 or higher (default 1.8 does not work)
require 'json'
require 'net/https'
require 'pathname'
# Extensions
You can’t perform that action at this time.