- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
This file contains 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
# from https://medium.com/@sidneyliebrand/how-fzf-and-ripgrep-improved-my-workflow-61c7ca212861 | |
function fp --description 'Search your $PATH' | |
set -l loc (echo $PATH | tr ' ' '\n' | eval "fzf $FZF_DEFAULT_OPTS --header='[find:path]'") | |
if test (count $loc) = 1 | |
set -l cmd (rg --files -L $loc | rev | cut -d'/' -f1 | rev | tr ' ' '\n' | eval "fzf $FZF_DEFAULT_OPTS --header='[find:exe] => $loc'") | |
if test (count $cmd) = 1 | |
echo $cmd | |
else | |
fp |
This file contains 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
Version: 1 | |
Packages: | |
- shinycssloaders | |
- furrr | |
- TrialSize | |
- PropCIs | |
- profvis | |
- DiagrammeR | |
- DiagrammeRsvg | |
- devtools |
This file contains 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
BASE_DIR="$HOME/.vim" | |
PLUGIN_DIR="$BASE_DIR/bundle" | |
COLORS_DIR="$BASE_DIR/colors" | |
AUTOLOAD_DIR="$BASE_DIR/autoload" | |
PLUGINS=( | |
"kien/ctrlp.vim" | |
"vim-airline/vim-airline" | |
"vim-airline/vim-airline-themes" | |
"scrooloose/nerdtree" |
This file contains 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
curl -L https://get.oh-my.fish | fish | |
omf install sushi | |
# copy fish config | |
fundle install 'nesl247/fish-theme-dracula' |
This file contains 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
https://github.com/moncho/dry |
This file contains 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
repo_create <- try(gh::gh("POST /user/repos", | |
name = repo_nm, | |
description = paste("Website for workshop", repo_nm)), | |
silent = TRUE) | |
if (inherits(repo_create, "try-error")) { | |
stop("Can't create repository. Does it already exist?") | |
} else if (inherits(repo_create, "gh_response")) { | |
if (identical(attr(repo_create, "response")$status, | |
"201 Created")) | |
message("repo created") |
This file contains 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
rstudio_type = function(x, pause = function() .1, mistake = 0, save = 0) { | |
get_ctx = function() rstudioapi::getSourceEditorContext() | |
ctx = get_ctx() | |
if (is.null(id <- ctx$id)) { | |
message('Please make sure an RStudio editor tab is open') | |
return() | |
} | |
save_it = function(prob = 1) { | |
if (ctx$path == '' || (rbinom(1, 1, prob) == 0)) return() |
This file contains 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_location <- .libPaths()[[2]] | |
pkgs <- c( | |
"RcppTOML", | |
"anytime", | |
"styler", | |
"sinew", | |
"shinyjs", | |
"diffr", | |
"data.table", |
This file contains 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
// This code is published under GNU GPL v3+. For more information, visit http://www.gnu.org/licenses/gpl.html | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" |