git config --global alias.unstage 'reset HEAD --'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dplyr style | |
polygons %>% | |
mutate(value = raster::extract.sfg(geometry, r, mean)) %>% | |
plot() | |
# sp style | |
value = raster::extract(polygons, r, mean, df = TRUE) | |
# multiple values | |
md <- function(x) data.frame(m = mean(x), d = sd(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Adapted from http://www.craigkerstiens.com/2015/12/29/my-postgres-top-10-for-2016/ | |
\set QUIET 1 | |
\pset null '¤' | |
-- Customize prompts | |
\set PROMPT1 '%[%033[1;34m%][%M %n@%/] # %[%033[0m%]%' | |
\set PROMPT2 '... # ' | |
-- Show how long each query takes to execute | |
\timing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from: https://stackoverflow.com/a/41935867/171659 | |
# choose the image according to the language chosen in .travis.yml | |
mkdir -p "$PWD":/home/docker | |
docker run -ti --rm -v "$PWD":/home/docker -w /home/docker -u docker r-base /bin/bash | |
# now that you are in the docker image, switch to the travis user | |
sudo - travis | |
apt-get install ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages(c("tidyverse", | |
# "devtools", | |
# "testthat", | |
# "usethis", | |
# "reprex", | |
# "covr", | |
# "lintr", | |
# "styler", | |
# "fs", | |
# "lookup", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set -g mouse-resize-pane on | |
# Use Alt-arrow keys without prefix key to switch panes | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# Shift arrow to switch windows | |
bind -n S-Left previous-window |
OlderNewer