How to embed a file gist in an HTML file? - github

I used to embed a gist file in the HTML using code such as the following:
<script src="https://gist.github.com/4577639.js?file=hello_world_addr.wsdl"></script>
This no longer works since all the files are shown and not the individual file. Anyone knows why this happening and how to fix it? Thanks!

Here you are good sir
<script
src="https://gist.github.com/claudemamo/4577639.js?file=hello_world_addr.wsdl">
</script>

Related

WeasyPrint report generation with SVG image in base64 format with CJK characters

I'm using WeasyPrint to create reports. I've been facing difficulties adding SVGs to the report.
I tried adding inline SVG and it doesn't work as explained here
Now I'm trying to add SVGs using base64 (as suggested here) and everything looks fine until I use CJK characters.
Attaching part of the html that I'm feeding WeasyPrint with (JsFiddle).
<html>
<body>
<img class='chart_image'
src='data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBzdHlsZT0iZm9udC1mYW1pbHk6J2x1Y2lkYSBncmFuZGUnLCAnbHVjaWRhIHNhbnMgdW5pY29kZScsIGFyaWFsLCBoZWx2ZXRpY2EsIHNhbnMtc2VyaWY7Zm9udC1zaXplOjEycHg7IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iMjAwIj48ZGVzYz5DcmVhdGVkIHdpdGggSGlnaHN0b2NrIDQuMi4yPC9kZXNjPjxkZWZzPjxjbGlwUGF0aCBpZD0iaGlnaGNoYXJ0cy01Ij48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNTM0IiBoZWlnaHQ9IjEwMyI+PC9yZWN0PjwvY2xpcFBhdGg+PC9kZWZzPjx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Utb3BhY2l0eT0iMC4xNSIgc3Ryb2tlLXdpZHRoPSIxIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxLCAxKSI+PC9wYXRoPjxwYXRoIGZpbGw9InJnYigyNDksIDI0OSwgMjQ5KSIgZmlsbC1vcGFjaXR5PSIgLjg1IiBkPSJNIDMuNSAwLjUgTCAxMy41IDAuNSBDIDE2LjUgMC41IDE2LjUgMC41IDE2LjUgMy41IEwgMTYuNSAxMy41IEMgMTYuNSAxNi41IDE2LjUgMTYuNSAxMy41IDE2LjUgTCAzLjUgMTYuNSBDIDAuNSAxNi41IDAuNSAxNi41IDAuNSAxMy41IEwgMC41IDMuNSBDIDAuNSAwLjUgMC41IDAuNSAzLjUgMC41Ij48L3BhdGg+PHRleHQgeD0iOCIgIHN0eWxlPSJmb250LXNpemU6MTJweDtjb2xvcjojMzMzMzMzO2ZpbGw6IzMzMzMzMzsiIHk9IjIwIj48L3RleHQ+PC9nPjwvc3ZnPg==' />
</body>
</html>
After processing the above code, WeasyPrint output looks like the following attached image:
I'm trying to understand if it is something I can fix by, maybe, explicitly setting the encoding somewhere where it is missing or if it something WeasyPrint needs to fix internally.
Any idea how to further troubleshoot the issue?

Viewing .swf Code Without Editing

I have a .swf file that I want to show people. I thought it would be a good idea for them to be able to view the code, but I don't want them to be able to edit it, so then they don't mess up my work. Are there any good programs for that? I'm using windows.
Do you want .swf on website? If so you can use html code.
<!DOCTYPE html>
<html>
<body>
<embed src="helloworld.swf">
</body>
</html>

Grunt Inline CSS and Javascript

Short Version:
Is there a way, using Grunt, to include minified CSS and JavaScript inline?
To use usemin's formatting as an example, I would like to see something like this:
<!-- build:css inline -->
<link rel="stylesheet" href="styles/foo.css">
<link rel="stylesheet" href="styles/bar.css">
...
<!-- endbuild -->
<!-- build:js inline -->
<script src="js/foo.js"></script>
<script src="js/bar.js"></script>
...
<!-- endbuild -->
Turned into this something like this:
<style>body { color: red; } /*css is here*/</style>
<script>var foo = 1; bar = 'some javascript code is here'; ...</script>
Long Version:
So, I'm working on a Tumblr theme. In order to use CSS or JS files in a theme, they have to be uploaded to Tumblr. The only way to upload is a crappy little web form that often crashes. I'm trying to avoid this interface until I'm ready to upload the final code because
there's no way to delete uploaded files, and
while I'm in the middle of development, these extra steps take too much time
To get this, I've been copying my CSS and JS into <style> and <script> tags in my file, then copying the whole thing into the Tumblr theme editor. It's faster, so I'm happy with that, but manually copying and pasting CSS and JS into a file seems to go against the spirit of Grunt and the automation it provides.
Ideally, I would be able to run grunt build and have it spit out an html file with the CSS and JS inline, then I can just copy that into the Tumblr interface (well, ideally, I would be able to copy that HTML file to Tumblr, but Tumblr doesn't provide FTP or SSH or any useful interface, so I'll settle for this).
It seemed like grunt-usemin could provide the functionality I'm looking for, but I haven't been able to get it working as I described. Maybe it's only made to put everything into a separate file.
I'm open to using any Grunt tool if anyone knows of one that could accomplish this.
I've used this one before: https://github.com/motherjones/grunt-html-smoosher. It's very straightforward, just provide an input file and output file; no extra configuration, it just finds the files automatically and inlines them.
grunt.initConfig({
smoosher: {
dist: {
files: {
'dest-index.html': 'source-index.html',
},
},
},
});
Hope this helps.
Just providing other references that might be useful:
This grant-inline task do inline css and javascripts but you can do it selective using the _inline parameter. There is also a similar task grunt-inline-assests that do same thing. Both are good to generate HTML e-mails.
Finally, the purpose of this one is a bit different; it inserts all your css and js as externals based on a tag in your HTML. This can be very useful when developing themes and front-ends where you want to have you js or css contained in many small files to easy maintenance. Sails-linker task can be used to inject all css and js while in development and one of the inliners above can be used to generate the final production HTML file with CSS and JS minified and inlined.

wrap code in notepad++

I love notepad++ but I dislike when someone sends me an .html or .xml file and the entire code is on one line. Is there a plugin or program that will take a one like code and indent it correctly on multiple lines?
Example:
<html><head><title></title></head><body><div></div></body><html>
<html>
<head>
<title></title>
</head>
<body>
<div>
</div>
</body>
<html>
There is an HTML tidy plugin available that correspond to your need. You can also install the TextFX plugin which adds a bunch of other enhancements.
There's a plugin named XML tool which does the pretty print for you.
Use Plugin Manager (Menu Plugins->Plugin Manager) to install it.

Problem With HTML5 Application Cache Whitelist - Won't Ignore Items

I'm trying to use HTML5 Application Cache to speed some things up on an iPhone webapp. It works great for storing images, css and JS, but the problem is that it also tries to store the HTML. I haven't been able to get it to ignore the html and stop storing it in the cache. From what I've read, I have to "whitelist" the files and directories that I want to load no matter what. I've tried listing the files I want cached explicitly, and I've tried adding a series of things under the "NETWORK:" heading. I've tried
*
/
/*
http://mysite.com
http://mysite.com/
http://mysite.com/*
None of them seem to work. Is there any way to ignore HTML files by MIME-Type or anything? Any advice would be appreciated.
Ryan
P.S. Of course, my site is not mysite.com..I just used that for simplicity.
I've avoided this problem by NOT referencing a manifest in each page, instead I have the following within each page :
<iframe src="cache.htm"></iframe> - with styles to hide the iframe
inside cache.htm I have :
<!DOCTYPE html>
<html manifest="cache.manifest">
<head>
<meta charset="UTF-8">
<title>Main Cache Resource</title>
</head>
<body></body>
</html>
based on previous tests and discussions with people in the html5 "ecosystem", each html-page that specifies a manifest is automatically cached as well.