Skip to content

Instantly share code, notes, and snippets.

@stephenll
stephenll / .bash_profile
Created February 2, 2014 02:45 — forked from jernejcic/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@stephenll
stephenll / tri_text.r
Created February 17, 2014 20:13
Read text into matrix
triangle <- as.matrix(read.table(text = "
357848 1124788 1735330 2218270 2745596 3319994 3466336 3606286 3833515 3901463
352118 1236139 2170033 3353322 3799067 4120063 4647867 4914039 5339085 NaN
290507 1292306 2218525 3000000 3985995 4132918 4628910 4909315 NaN NaN
310608 1418858 2195047 3757447 4029929 4381982 4588268 NaN NaN NaN
443160 1136350 2128333 2897821 3402672 3873311 NaN NaN NaN NaN
396132 1333217 2180715 2985752 3691712 NaN NaN NaN NaN NaN
440832 1288463 2419861 3483130 NaN NaN NaN NaN NaN NaN
359480 1421128 2864498 NaN NaN NaN NaN NaN NaN NaN
376686 1363294 NaN NaN NaN NaN NaN NaN NaN NaN
@stephenll
stephenll / app.R
Last active August 29, 2015 14:17 — forked from wch/app.R
library(png)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(width=3,
actionButton("newimages", "New images"),
h4("Double-click options"),
wellPanel(
sliderInput("dblclick_delay", "Delay", min=100, max=1000, value=400,
@stephenll
stephenll / custom.css
Last active August 29, 2015 14:26 — forked from ClintWeathers/custom.css
1000px rendering for rmarkdown
.main-container {
max-width: 1000px !important;
}
@stephenll
stephenll / stata_summary.R
Created February 21, 2018 13:48 — forked from leeper/stata_summary.R
Stata-style regression summaries
stata_summary <-
function(
x,
...
) {
# summarize
mod <- x
x <- summary(x)
# find outcome variable