CheatSheet.html
is a mini-infrastructure for hosting cheat sheets.
It's basically a minimalistic HTML page which pulls its content from a public Google Sheets spreadsheet (or from a static JSON file).
Cheat sheets currently available:
In order to use this infrastructure for your own cheat sheets:
- Create a new Google Drive Spreadsheet
- Add the following columns as a header:
Category, Subcategory, Weight, Is Starred?, Command, Description, More Info, Output
- Change the spreadsheet permissions so that it has public Read-Only permissions
- Modify
SPREADSHEET_ID
inCheatSheet.html
to point to your spreadsheet ID - Modify the table of contents under
setupCheatSheet
to include the spreadsheet name (and any information that should appear in the footer)
At this point, there are two options to access the spreadsheet content:
- Using a Google Spreadsheet API Key:
- Create an API Key using the instructions here
- Append the API Key to the request, e.g.
CheatSheet.html?google_api_key=<API_KEY>
- Using a static JSON file:
- Access the spreadsheet via
https://sheets.googleapis.com/v4/spreadsheets/<SPREADSHEET_ID>/values/<SPREADSHEET_NAME>?key=<API_KEY>
- Save the resulting JSON file to the same directory as
CheatSheet.html
- Access the spreadsheet via
See this StackOverflow Question for more information about accessing Google Spreadsheets as JSON files.