Skip to content

Instantly share code, notes, and snippets.

@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@brentajones
brentajones / amtrak.csv
Created September 10, 2016 00:18
Amtrak stations, dumped from National Transportation Atlas Database (2015)
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 2. in line 8.
X,Y,OBJECTID,STNCODE,STNNAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP,STNTYPE,STFIPS
-82.44084200005824,38.415404999740986,1,HUN,"Huntington, West Virginia",1050 8th Avenue,,Huntington,WV,25701,RAIL,54
-97.930060999815225,38.055858999992893,2,HUT,"Hutchinson, Kansas",North Walnut St & East 3rd Ave,,Hutchinson,KS,67501,RAIL,20
-85.469924999738907,43.395728999693631,3,HWC,"Howard City, Michigan",130 North Ensley St.,Sunoco Station,Howard City,MI,49323,BUS,26
-116.233170000495079,33.714751999705072,4,IDO,"Indio, California",NE Corner Hywy-111 and Monroe Street,Sunline Bus Stop,Indio,CA,92201-3917,BUS,06
-94.429297999503035,39.086975000296093,5,IDP,"Independence, Missouri",600 South Grand Ave.,,Independence,MO,64050-3564,RAIL,29
-86.160309000060295,39.762154000007172,6,IND,"Indianapolis, Indiana",350 South Illinois Street,,Indianapolis,IN,46225-1198,RAIL,18
-117.759192999657159,33.674767000296868,7,IRV,"Irvine, California",15215 Barranca Parkway,Irvine Transportation Center,Irvine,CA,92618,RAIL,06
-90.190598000297427,32.

Here's a sort of unsolved logic/programming problem.

I made this site, Old Fashioned, for cocktail recipes. It has structured data for ingredients and recipes for cocktails. And one of its neat features is that, given certain ingredients, it shows you what's possible or what's nearly possible.

I've been thinking about the opposite angle: from which set of 5 ingredients can you make the highest number of different cocktails? How does one correctly solve this problem.

If formal descriptions are your jam: let's say:

  • You have 100 different ingredients
  • You have 20 cocktails, each of which use 2-6 ingredients
@BrianMitchL
BrianMitchL / Eleventy Redirect From.md
Last active July 23, 2024 19:27
Eleventy Redirect From

Eleventy Redirect From

Use this template for drop-in replacement from the jekyll-redirect-from style of creating redirect files from old routes to the route of the current page.

In the front matter or data of a page, add one or many redirects:

Single

redirect_from: /old-url/page