Skip to content

Instantly share code, notes, and snippets.

View micahwoods's full-sized avatar

Micah Woods micahwoods

View GitHub Profile
merlinmann /
Last active July 29, 2023 21:09
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

gavinsimpson / genURLS.R
Last active November 6, 2018 16:13
Functions to automate downloading data from the Government of Canada's Climate/Weather website
View genURLS.R
genURLS <- function(id, start, end, timeframe = c("hourly", "daily", "monthly")) {
years <- seq(start, end, by = 1)
nyears <- length(years)
timeframe <- match.arg(timeframe)
if (isTRUE(all.equal(timeframe, "hourly"))) {
years <- rep(years, each = 12)
months <- rep(1:12, times = nyears)
ids <- rep(id, nyears * 12)
} else if (isTRUE(all.equal(timeframe, "daily"))) {
months <- 1 # this is essentially arbitrary & ignored if daily
abresler / tufte
Last active July 4, 2023 18:56
Recreating Edward Tufte's New York City Weather Visualization
View tufte
"" %>%
read.table() %>% data.frame %>% tbl_df -> data
names(data) <- c("month", "day", "year", "temp")
data %>%
group_by(year, month) %>%
nateware /
Last active July 10, 2022 20:50
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">
cengel / GreatCircleFlights.R
Created March 22, 2012 23:14
Great Circles in ggplot
View GreatCircleFlights.R
airports <- read.csv("",, header=TRUE)
flights <- read.csv("",, header=TRUE)
# aggregate nunber of flights