This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // An example script consuming an API with various throttling and 429 error | |
| // handling strategies. | |
| // | |
| // Blog post with more context | |
| // https://www.useanvil.com/blog/2021-03-29-throttling-and-consuming-apis-with-429-rate-limits | |
| // | |
| // License: MIT | |
| import fetch from 'node-fetch' | |
| import mapLimit from 'async/mapLimit' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # copy/import data from heroku postgres to localhost pg database | |
| # useful for copying admin's work on live site into local database to reproduce errors | |
| # https://devcenter.heroku.com/articles/heroku-postgres-import-export | |
| # take heroku pg snapshot and download | |
| heroku pg:backups:capture | |
| heroku pg:backups:download | |
| # load the dump into local postgres database, assuming $DATABASE_URL set locally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo 'update brew' | |
| brew update | |
| echo 'upgrade brew' | |
| brew upgrade |