Skip to content

Instantly share code, notes, and snippets.

/* ==UserStyle==
@name FanGraphs
@namespace benelsen.com
@version 1.0.0
@description Remove comments, make blog more readable
@author Ben Elsen <mail@benelsen.com>
==/UserStyle== */
@-moz-document domain("fangraphs.com") {
#comments {
display: none;
@benelsen
benelsen / block.txt
Last active December 22, 2019 16:30
Let's block it
# Comments
tageblatt.lu###comments
wort.lu###wort-comments
rtl.lu###comments
rtl.lu##.article--comments
rtl.lu##.card__comments
lessentiel.lu###talkback
@benelsen
benelsen / venues.csv
Created October 15, 2019 15:16
Baseball Venues
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 16 columns, instead of 1. in line 9.
venue,venue_id,venue_w_chan_loc,location,home_team_name,home_team_id,home_code,home_division,home_league_id,home_name_abbrev,home_sport_code,roof,longitude,latitude,altitude,direction
Tokyo Dome,2397,JAXX0085,"Tokyo, JP",,,,,,,,dome,139.751892,35.705588,8,
Nationals Park,3309,USDC0001,"Washington, DC",Nationals,120,was,E,104,WSH,mlb,open,-77.007716,38.872576,2,29
Yankee Stadium,3313,USNY0172,"Bronx, NY",Yankees,147,nya,E,103,NYY,mlb,open,-73.926949,40.829489,4,75
Miller Park,32,USWI0455,"Milwaukee, WI",Brewers,158,mil,C,104,MIL,mlb,roof,-87.971642,43.028436,188,130
Citizens Bank Park,2681,USPA1276,"Philadelphia, PA",Phillies,143,phi,E,104,PHI,mlb,open,-75.166592,39.905584,-2,9
Rogers Centre,14,CAXX0504,"Toronto, ON",Blue Jays,141,tor,E,103,TOR,mlb,roof,-79.389181,43.641682,83,
Tropicana Field,12,USFL0438,"St. Petersburg, FL",Rays,139,tba,E,103,TB,mlb,dome,-82.653453,27.768110,14,
Globe Life Park in Arlington,13,USTX0045,"Arlington, TX",Rangers,140,tex,W,103,TEX,mlb,open,-97.082997,32.751593,165,135
Oakland Co
# setup
# import Pkg;
# Pkg.pkg"add Makie#master PlotUtils GeoInterface GeoJSON"
using Makie
using GeoInterface, GeoJSON
using PlotUtils
using Proj4
states = download("https://raw.githubusercontent.com/PublicaMundi/MappingAPI/master/data/geojson/us-states.json")
### Keybase proof
I hereby claim:
* I am benelsen on github.
* I am benelsen (https://keybase.io/benelsen) on keybase.
* I have a public key ASD2VcS5bOcmuU3tTZqB2p3qrkbnb9nRn5zW8FO_I4Facgo
To claim this, I am signing this object:
@benelsen
benelsen / proj.rb
Last active May 16, 2017 20:41
Winkel-Tripel with GDAL2

Requires gdal2:

brew install osgeo/osgeo4mac/gdal2
export PATH="/usr/local/opt/gdal2/bin:$PATH" # or just use /usr/local/opt/gdal2/bin/gdalwarp

And a build of bleeding-edge version of proj:

brew reinstall proj.rb --HEAD
#!/usr/bin/env zsh
tempfile=/tmp/${${2##*/}%.*}.temp.tiff
# pi=3.1415926536
# h=35785831.00 # default
# h=35939462.66
h=35862958.67 # <- correct
# r_a=35000.0

Keybase proof

I hereby claim:

  • I am benelsen on github.
  • I am benelsen (https://keybase.io/benelsen) on keybase.
  • I have a public key whose fingerprint is 9524 7B66 F323 49CA FFD2 701C E3FD 2168 3BDA 2FC1

To claim this, I am signing this object:

@benelsen
benelsen / README.md
Last active January 16, 2020 12:20 — forked from shancarter/.block

DESCRIPTION

[
{
"COMMENT": "GENERATED VIA SPACETRACK.ORG API",
"ORIGINATOR": "JSPOC",
"NORAD_CAT_ID": "34602",
"OBJECT_NAME": "GOCE",
"OBJECT_TYPE": "PAYLOAD",
"CLASSIFICATION_TYPE": "U",
"INTLDES": "09013A",
"EPOCH": "2013-10-20 03:07:28",