Skip to content

Instantly share code, notes, and snippets.

View dangovorenefekt's full-sized avatar

DanGovorenEfekt dangovorenefekt

View GitHub Profile
@dangovorenefekt
dangovorenefekt / nginx.conf
Last active September 1, 2021 06:09 — forked from weapp/nginx.conf
Return common errors as json in Nginx
error_page 500 /500.json;
location /500.json{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.json;
location /502.json{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
}
@dangovorenefekt
dangovorenefekt / beautiful.rest.api.docs.in.markdown.md
Created July 17, 2021 18:10 — forked from azagniotov/beautiful.rest.api.docs.in.markdown.md
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
Format:
https://itunes.apple.com/#{@country_code}/rss/toppodcasts/limit=#{CHART_RESULT_LIMIT}/genre=#{@itunes_genre_id}/explicit=true/json
Grab genre ids from here:
https://podcasts.apple.com/us/genre/podcasts/id26
e.g. https://itunes.apple.com/us/rss/toppodcasts/limit=10/genre=1301/explicit=true/json