Skip to content

Instantly share code, notes, and snippets.

View abalter's full-sized avatar

Ariel Balter abalter

  • Center For Health Systems Effectiveness, OHSU
  • Portland, OR
View GitHub Profile
@abalter
abalter / datatables-editor-template.markdown
Created May 8, 2022 05:16
datatables editor template
@abalter
abalter / matlab_to_r_transpilers.md
Created April 3, 2022 22:12
List of tools to transpile matlab to R
.ipynb_checkpoints
@abalter
abalter / test_xlsx.xlsx
Last active December 24, 2019 21:46
Strange xlsx for stackoverflow question
@abalter
abalter / test.R
Created January 17, 2019 21:36
test R file to source
print("hello")
@abalter
abalter / ...README.md
Created January 8, 2019 21:56
A function to enable using conda seamlessly with R
  • Install EVERYTHING you can with conda
  • Install things you can with:
    • install.packages(, lib="")
    • install.github(, lib="")
    • biocLite(, lib="")
  • Make separate local libs for different R versions
  • After installing a package to a local lib, look there and see if there are dependencies you could have installed with conda.
  • Or, head it off by looking at the dependencies in CRAN or Bioconductor
@abalter
abalter / travel-time-distance-apis.md
Last active September 5, 2022 15:30
Travel time and directions APIs

https://developers.google.com/maps/documentation/distance-matrix/intro | Developer Guide  |  Distance Matrix API  |  Google Developers https://developers.google.com/maps/documentation/distance-matrix/client-library | Client Libraries for Google Maps Web Services  |  Distance Matrix API  |  Google Developers https://github.com/googlemaps/google-maps-services-python | googlemaps/google-maps-services-python: Python client library for Google Maps API Web Services https://developers.google.com/maps/documentation/directions/start | Get Started  |  Directions API  |  Google Developers https://developers.google.com/maps/documentation/distance-matrix/start | Get Started  |  Distance Matrix API  |  Google Developers https://github.com/googlemaps/google-maps-services-js | googlemaps/google-maps-services-js: Node.js client library for Google Maps API Web Services https://www.myprogrammingtutorials.com/find-distance-between-two-addresses-google-api-php.html | Find Distance Between two Addresses using Google API and PHP -

@abalter
abalter / complicated-scrollspy.js
Created May 29, 2018 05:16
A scrollspy that tries to guess when a section is in focus using the direction of travel. Sort of works.
let focus_height = 160;
let click;
function spyOnScroll()
{
let anchors = $('a[href^="#"][class*="menu-item"]');
let hash_positions = [];
let hashes = [];
/*
@abalter
abalter / listdir.js
Last active December 5, 2023 22:42
Get directory listing on server using JavaScript
var url = "http://someserver/somepath/somedir/?C=M;O=A";
$.get(url, (data) =>
{
console.log(data);
let listing = parseDirectoryListing(data);
$('body').append(JSON.stringify(listing));
});
function parseDirectoryListing(text)
{
@abalter
abalter / index.html
Created April 5, 2018 03:55
Super simple flexbox responsive nav
<div id="nav">
<div id="menu-toggle"><button id="hamburger">MENU</button></div>
<div class="nav-items">
<a href="#home" class="active">Home</a>
<a href="#news">News</a>
<a href="#contact">Contact</a>
<a href="#about">About</a>
</div>
</div>