github-pages 200.html support - github-pages

Does github pages support the 200.html file? The intended functionality is that it catches any requests for files that do not exist in the website and responds with its content and a HTTP 200 status. I couldn't find any doco on it.
I know they support 404.html

That doesn't seem to be supported yet, and is discussed as part of isaacs/github issue 408, a non-official feature requests to GitHub.
Using 400.html instead was a "hack" seen in 2016.

Related

Where can I find documentation for Ember 0.9.8?

I have a client from years ago that wants a few changes to an Ember app that was written in ember-0.9.8. I haven't used ember since then, and I know a lot has changed. But, I still need to refer to the old documentation, and the website seems to only go back as far as 1.10.
Ember v0.9.8 was release on May 21, 2012. This is a little before any of their git repos for the guides.
The guides back then were within the emberjs repo and had to be built manually.
Download the release: https://github.com/emberjs/ember.js/releases/tag/v0.9.8
The README.md file has instructions for building the documentation.
Building API Docs
The Ember.js API Docs provide a detailed collection of methods,
classes, and viewable source code.
NOTE: Requires node.js to generate.
See http://emberjs.com/ for annotated introductory documentation.
Preview API documenation
run rake docs:preview
The docs:preview task will build the documentation and make it available at http://localhost:9292/index.html
Build API documentation
run rake docs:build
HTML documentation is built in the docs directory
You can give it a try, but good luck - it might be tough.
As mentioned by Lux the API documentation is in the code and that one is on GitHub. You could find the ember code at that point of time by tag. The readme contains information about how to generate the API docs. If you are lucky it will still work.
v0.9.8.1 was released on 23 May 2012. That's quite a long time for a web application to run without any major refactoring. Ember has changed hardly since then.

Can hosted GitHub Pages websites accept file uploads?

I would like to create a simple website that accepts a text file upload for a small project that parses the text. Is this possible to do with GitHub Pages? I haven't found anything that addresses this functionality so I am wondering if it is possible or not.
As seen in this issue, there is no server side configuration or execution with GitHub Pages, so no.
The only workaround is rafrex/spa-github-pages: Single Page Apps for GitHub Pages, a lightweight solution for deploying single page apps with GitHub Pages. You can easily deploy a React single page app with React Router <BrowserRouter />.
But that might not include what you are looking for.

Django Swagger and JSON API render issues

Using django-rest-framework-json-api I am able to create API end points that work as described within the documentation. Attempted to provide API documentation using django-rest-swagger is not so easy.
1: Swagger uses media_type = 'application/json' which is not supported in the JSON API. To get around this I created a second render class (renderer_classes) that sub classes the JSON API JSONRenderer and forces the media type.
Now the end point supports application/json and application/vnd.api+json and swagger is happy to render in JSON API document structure. Aware that the generated curl requests have none a standard JSON API header.
2: Swagger has the same issue with the parser. While the work out from issue 1 does work there is a secondary challenge. Swagger renders a flat dictionary of field names which is not JSON API and ultimately is requested by DRF.
Is it possible to get swagger to parse in JSON API? At the moment Swagger is not working for PUT or POST.
djangorestframework-jsonapi==2.2.0
djangorestframework==3.5.4
Django==1.11.2
coreapi==2.3.1
python 3.6
Answering my own question here so that others can gain value from what was learnt. We never found a solution to this issue and we did not have the time available to contribute to this project. In general the project also appears to be struggling, maybe due to people like us not contributing...
An alternative project drf-yasg has now emerged, which did not exist at the time of this original posting. drf-yasg was relatively easy to deploy and solved all of our issues so we have now migrated to this project instead.
So if you a looking for swagger api documentation for JSON API endpoints created within DRF, then I would suggest drf-yasg.
At the time of writing JSON API is not supported out of the box, but there is sample code to get it up and running relatively easily. With this change in place, all of the endpoints will be auto documented.
This Github Gist that contains the code from our app, hope that this helps you out until this feature is fully developed.
As you pointed out in your own answer there is an alternative: drf-yasg. This is great package but does not support JSON API schema out of the box.
That's way you'd even better use drf-yasg-json-api that adds JSON API support to drf-yasg by providing all necessary field inspectors, you just need to slightly extend your SWAGGER_SETTINGS.
Check drf-yasg-json-api Github repo for details.
Disclaimer: I am the author of this package.

How do I send a Purge Request

I'm trying to purge several URLs via php of Akamai servers. So far I've been using the CCU Rest Api which simply sends a HTTP-Request with the urls and options encoded in json. I've heard that the support of this API will end soon so I wanted to use a different API to do it.
I wanted to use this one
Since the documentation is really unstructered and does not tell anything how to send the credentials to the server. I already found their GitHub repositry but I didn't understand anything because I'm pretty new to PHP.
Can someone please explain me how to send only the Purge Request? Validation and checking the results is a piece of cake, the Request is the point where I'm struggeling.
Thanks a lot
You can use the newer OPEN API, I've written a blog post telling you how to get started
https://community.akamai.com/community/developer/blog/2015/08/20/getting-started-with-the-v2-open-ccu-api
The older API is much less secure, and the newer method will allow, very soon, for 5 second purges.
Let me know if you have any more questions,
Thanks,
Kirsten

Django App to open github issues on server 500

I am working on a Django project and, so far, we are receiving e-mails when a Server Error 500 happens in our backend. However, as we are a team of developers, we would like to open Github Issues instead of sending these e-mails. We have our project on Github of course.
I have been searching for an existing Django App that we could reuse but unfortunately I did not find any integrating such functionality.
Does anyone know if there is such Django application? The idea seems pretty simple and I am surprised i could not find any application available for this purpose.
Moreover, a search on django packages does not show many results...
Thanks in advance