Skip to content

Instantly share code, notes, and snippets.


Bryan Hanson bryanhanson

View GitHub Profile
View ExploreGithubTopics.Rmd
title: "Explore Github Topics"
author: "Bryan Hanson"
date: 2020-01-24
<!-- Following code to keep printed version cleaner; see -->
<style type="text/css" media="print">
a:link:after, a:visited:after {
content: normal !important;
bryanhanson / GithubAccess.R
Last active Jan 25, 2020
Set up Github authorization on your local machine
View GithubAccess.R
# R code
# Based on
# This is called "Web Application Flow"
# see
# Follow the instructions there to set up a token. Never share your key or secret.
myapp <- oauth_app("FOSS", key = "pqr", secret = "xyz")
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp)
bryanhanson / d3simpleLine1.html
Created Nov 14, 2014
A simple d3 Line example
View d3simpleLine1.html
<!DOCTYPE html>
<meta charset="utf-8">
<script src = ""> </script>
bryanhanson / reallySimpleD3line.html
Created Apr 27, 2014
Drawing a line in d3.js starting from separate x & y arrays
View reallySimpleD3line.html
<!DOCTYPE html>
<meta charset="utf-8">
<script src = ""> </script>
// Draw a very simple line using d3 functions
bryanhanson / IntersectLineSeg.R
Created Apr 26, 2013
Determine if two line segments intersect (not lines!)
View IntersectLineSeg.R
# R functions to determine if two line segments intersect
# Note: this is very different question from whether
# two lines intersect (terminology is important!)
# These functions are based upon the excellent discussion here,
# written by Martin Thoma:
# The starting point was the code here: