Jolt Transform Demo Not working for me - jolt

when i try to open Jolt Transform Demo link (http://jolt-demo.appspot.com/) in any browser (Chrome,IE,Opera) some of the scripts are not loading.Due to that Jolt Transform Demo page not working.Please look into attachment for reference.

All the JavaScript libraries that are not loading are from https://cdnjs.cloudflare.com which is the Open Source CDN from CloudFlare. See https://cdnjs.com/about
You are probably behind some corporate firewall that has decided it doesn't like that CDN.

Related

Mermaid syntax error on trying render a diagram on Github .md file

I've followed this MermaId tutorial but when I try put into my .md file on Github an error is raised:
This works perfectely on Live editor.
Code:
```mermaid
sequenceDiagram
autonumber
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
Someone can help me find my error on try write it on Github
Currently, I struggle on a similar problem.
With GitHub, do you mean GitHub pages?
Could you find a solution to it?
Personally, I have a setup with Jekyll. Here is my question on how to setup mermaid correctly for jekyll.
Interestingly, I just posted your mermaid into my jekyll page and the result is:
If I put it into <div> tags with class mermaid. Setup I used was this.
And if I use the jekyll spaceship-plugin, ist renders to:
I guess, that this what it should like. Am I right?
Therefore, so far, for me mermaid works based on the spaceship plugin, but not by "natively" referencing the mermaid JavaScript. I do not know if spaceship will work with GitHub pages, however, definitely within GitHub pages (which is based on Jekyll), you may also add plugins. See documentation for further details.

Best way how to publish OpenAPI document on GitHub (readme.md)?

I have a project hosted on GitHub. To document the API I am using the OpenAPI spec. Now I want to add a link on readme.md (on GitHub) that refers my visitors to the OpenAPI document for good user experience.
Far as I see I have two solutions:
http://editor.swagger.io/?raw=https://raw.githubusercontent.com/path/to/file.yaml
https://app.swaggerhub.com/apis/(username)/(api-name)/(api-version)
Both approaches are working, but they both open with an editor on left side that shows the content of YAML file and is, IMHO, wasting a significant screen space. Not really what I want. Is there an option to display the OpenAPI document without editor opened? Just similiar what is done for https://petstore.swagger.io/ which comes without editor opened.
Or ... is there maybe an option available to display the OpenAPI document on GitHub directly?
Thanks, Christoph
If you use SwaggerHub, replace /apis/ with /apis-docs/ in the URL to view just the API docs without the editor part. For example:
https://app.swaggerhub.com/apis-docs/swagger-hub/registry-api/1.0.47
Or if your OpenAPI definition is hosted elsewhere (e.g. on GitHub), you can use
https://petstore.swagger.io/?url=https://path/to/file.yaml
to load it into the public Swagger UI demo. Swagger UI renders API docs without the editor part.

Mathjax don't show up on Jekyll Github Pages but show up on localhost

I am using Jekyll on my Github Page. I created a blog post using MathJax to display math equations.
I used the script written in here in a file mathjax_support.html that I put in my _includesdirectory. Then in _includes/head.html I added the line
{% include mathjax_support.html %}
just before the </head>.
Once I do that, running my Jekyll blog locally on localhost works just fine but commiting to my Github Page will break the MathJax code.
Here is the blog post on Github that I am trying to display correctly. I am using kramdown as my markdown parser.
I cannot understand why it works on one side and not the other.
If anyone has any idea, I would be happy to hear it. Thanks !
You don't really need to get MathJax working on your GitHub Page. You can instead implement this hack:
Step 1) Run the blog locally and take screenshots of all expressions
Step 2) Commit the screenshots to your GH Page or upload them to an image hosting service
Step 3) Replace all expressions with their respective images, e.g replace $x+2=3$ with . Use direct links or browsers will be unable to load the images!
Btw, this is the Markdown syntax for inline images: ![description of the image, in case it doesn't get loaded](link-to-the-image "mouseover text (optional)")
Step 4) That's it! Now you can commit everything to the GH Page and have it work just fine.

Can I embed source files from GitHub on my web page other than Gists?

Context
You can create a Gist on GitHub and embed it on your web page: embedding Gists.
This is an example of a randomly chosen Gist: tap.groovy.
Question
Is embedding also possible with other code files from GitHub, for example with this randomly chosen C# file ICommand.cs which is not a Gist?
You can try https://emgithub.com, which does exactly what you want.
To embed the example file ICommand.cs in your question, you can just add "em" before "github.com" in the address bar, then press Enter.
Then you can get a script tag like this:
<script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcorefx%2Fblob%2Fmaster%2Fsrc%2FSystem.ObjectModel%2Fsrc%2FSystem%2FWindows%2FInput%2FICommand.cs&style=default&type=code&showBorder=on&showLineNumbers=on&showFileMeta=on&showCopy=on"></script>
Note if you simply click Run code snippet in StackOverflow, the copying button at top right corner may not work. Running it outside SO would work fine.
Unlike other websites that do similar work, EmGithub.com is a static site hosted on Github Pages. Fetching target files and highlighting are done on your browser.
Disclosure: I'm the developer of it :)
You can use https://gist-it.appspot.com/:
<script src="http://gist-it.appspot.com/https://github.com/dotnet/corefx/blob/master/src/System.ObjectModel/src/System/Windows/Input/ICommand.cs"></script>
There's a standard for embedding content from one website in another via a URL, called oEmbed. Unfortunately, GitHub is not a oEmbed provider, i.e. it doesn't support oEmbed for its URLs.
I found a proxy service, Oembed Proxy for GitHub,
which adds oEmbed support for GitHub's code URLs. You pass a GitHub URL as a parameter to the proxy's URL and a resulting URL can be be pasted in another website, assuming that website supports embedding oEmbed links.
Another obstacle is that not every website supports embedding oEmbed URLs. According to the proxy's documentation, notion is one website that supports them. I did some research and looks like it should be possible to add oEmbed support to e.g. wordpress or jekyll.
This answer provides a very limited solution, due to small adoption of oEmbed. I thought it would be worth to spread the word nonetheless.
Another possible service is https://github.com/finom/github-embed. It seems to be unmainted by now for about 2 years, but gist-it seems to be unmaintained for even 6 years. I've tried neither, though.
You can use gistYard
<iframe src="https://gistyard.piyushdev.xyz/emd.html?lang=&from=0&to=&code=https://raw.githubusercontent.com/dotnet/corefx/master/src/System.ObjectModel/src/System/Windows/Input/ICommand.cs&edit=true&dm=off" width="100%" height="330" frameborder="0"></iframe>
It provides features like changing theme , cutting code directly from raw , edit mode , custom styling and others.

GitHub pages generator removing <video> tag

Context
I usually set up quick GitHub pages to document a few developments I do. They are usually very simple pages, which I generate from the repo settings using the Page Generator. I want to continue using this method, as moving to proper gh-pages with jekyll is too much of an overhead for something so simple.
Recently I came across a use case, where adding a simple 2 min video to the first section made a lot of sense. Not knowing any native markdown for HTML video I've decided to add the HTML code directly as I do in a lot of other situations:
<video width="640" height="400" controls preload>
<source src="https://github.my.company.com/Org/sample/blob/master/intro.mp4?raw=true"></source>
</video>
Problem
When I generate the page the tag is not there, which normally happens when the video tag is not supported. If I open the chrome console and edit the HTML directly, as expected, the video shows fine and I can play it, etc.
I can only assume that GitHub markdown engine, is removing the video tag because the context in which is running does not support video (headless, non-compatible agent, whatnot).
Since GitHub says it supports native HTML into page rendering, there's no specific markdown to say "DO NOT PARSE THIS AT ALL COSTS", leaving me without many options left.
Question
Has anyone come across this issue, and do you know if it's possible to have a video tag in a generated page without moving on to Jekyll?
As a quick solution to encounter this issue: you can convert your video into gif using any converter then insert it in your markdown ex:
## Website Overview
![alt_text](path_to_the_.gif)
You can delegate all the heavy job to a video hosting service.
Advantages are :
they do all the html video / flash fallback for you
they can serve proper encoding / bandwith depending on device / network
they have specialized CDN that ensure good delivery (? depends on carrier but
you cannot know)
Everybody in the industry delegates the pain of video management.
And the only code you have to add is something like this :
<iframe width="420" height="315" src="//www.youtube.com/embed/KgLfpnPdqZw" frameborder="0" allowfullscreen></iframe>