##Ubuntu Server
sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28| # Composition of the containers | |
| owncloud: | |
| image: owncloud | |
| ports: | |
| - 80:80 | |
| volumes_from: | |
| - owncloud-data | |
| links: | |
| - postgres:owncloud-db |
My notes for Dokku on Digital Ocean.
These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.
Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).
# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)
ssh henroku dokku
| ## assuming you have a folder full of .csv's to merge | |
| ## csv's must all have identical column names. | |
| folder <- "./path/to/csv/files" | |
| filenames <- list.files(folder) | |
| all_files <- Reduce(rbind, lapply(filenames, read.csv)) |
Notes from reading through R Packages by Hadley Wickham. This is meant to review, not replace, a thorough readthrough. I mainly wrote this as a personal review, since writing summaries and attempting to teach others are some of the best ways to learn things.
Packages are used to organize code together so that it can be used repeatedly and shared with others.
A lot of work with packages is done via the devtools package.
| library(shiny) | |
| library(rmarkdown) | |
| shinyServer(function(input, output) { | |
| output$html = reactive({ | |
| t <- tempfile() | |
| cat(input$markdown, file = t) |
| 'use strict'; | |
| var domain = require('domain'); | |
| var userMethod = 'handler'; | |
| var userCodeWrapper = function(userCode) { | |
| return '\ | |
| "use strict";\n\ | |
| ' + userCode + '\n\ | |
| try {\n\ |
Title: Project Title Author: First Last Email: Email@Example.com Address: 1234 Street, City, State 12345 Phone: (XXX)XXX-XXXX Affiliation: www.LaCroixDesign.net Copyright: 2015 Company Name Keywords: Proposal, Web Design Date: March 13, 2015
| import simplejson as json | |
| import requests | |
| #your spreadsheet key here. I'm using an example from the Victorian election campaign | |
| key = "1THJ6MgfEk-1egiPFeDuvs4qEi02xTpz4fq9RtO7GijQ" | |
| #google api request urls - I'm doing the first one just to get nice key values (there's probably a better way to do this) | |
| url1 = "https://spreadsheets.google.com/feeds/cells/" + key + "/od6/public/values?alt=json" |
| llxc = function( a, ll=-12:12, legend.loc="topleft", displayLegend=T, legend.cex=1.0, overplot=F ) | |
| { | |
| if ( ncol(a) < 2 ) | |
| { | |
| print( "Not enough columns") | |
| return; | |
| } | |
| a = na.omit(a) | |