Skip to content

Instantly share code, notes, and snippets.

View johnatasjmo's full-sized avatar

Johnatas Montezuma johnatasjmo

  • Long Beach, California
View GitHub Profile
# source files with errors
# https://stackoverflow.com/questions/14612190/is-there-a-way-to-source-and-continue-after-an-error
# Source TD Data Pull
ll <- parse(file = "11-tda_pull.R")
for (i in seq_along(ll)) {
tryCatch(eval(ll[[i]]),
error = function(e) message("Oops! ", as.character(e)))
}
@johnatasjmo
johnatasjmo / source_files_from_folder.R
Created January 20, 2018 16:44
R - Source all files within folder
setwd("~/rProgramming")
files.sources = list.files()
sapply(files.sources, source)

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@johnatasjmo
johnatasjmo / pr.md
Created September 30, 2017 06:44 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: