Why is Gist showing "File suppressed. Click to show."? - gist

This gist is showing a message File suppressed. Click to show. on one of the files. Why is this file suppressed?
The file contains a bookmarklet, starting with javascript:, perhaps that is not safe?

I have one that is not dangerous, only a variable declaration, but it is very long. Perhaps that is the reason? (length).

Me too. When I created a bookmarklet I was surprised too for that message, so I googled and came here.
Initially I had a js code in one line and a comment with a word "bookmark", but I tried and pasted the full code and later the one line bookmarlet specifying it. Also to reassure I pasted the bookmarklet in a comment too
Here you can see: Gist

Related

Import HTML via Command Line per documentation

Per this page in Evernote's Developer Documentation, I should be able to create a note from an existing html page with the command line syntax : Evernote myfile.html.
It works fine for myfile.txt but simply ignores an .html file.
This previous forum post from 2014 seems to suggest this a long standing known issue that has not been corrected,nor has the documentation changed to indicate this is not the desired/expected behavior.
Am I doing something wrong? Is there a simple way to import a HTML file into Evernote not as an attachment, but the note itself?
Thank you.

How to quote lines from source in github markup

I have seen this post on How to link to specific line number on github which tells you how to create a permalink to lines of source code on github. That's great!
My question is, how can you quote lines of code in a Stackoverflow post such that you see the code & the line numbers - just as you would if you view the source code directly?
The only way I currently know to quote code is literally copying & pasting it into the post; but then you need to include the permalink or quote line numbers as well so that the people reading your post know where in the source file to look. It would be so much easier if they could just see the code & link number in the post.
I think you have to add in the line number yourself but the GitHub flavor markdown for blockquotes and code are documented here.

Changing the Moodle footer logo

How to change the Moodle logo which will be displayed at the footer page and change to some other logo? As per the given link 1 I have tried but I could not find the footer.html file in my themes folder.
So please help me with some other method (which does not use local machine because I'm working with a remote machine where I could access only the Moodle site, and nothing more than that) to change the logo and link of Moodle.
This depends on your theme - So you're not going to get a precise answer unless you post more details. But here's the gist:
Every theme is made in parts. Normally, you have a header, a content, a sidebar (or two) and a footer.
You want to be editing the footer file.
The footer file is going to be something within the lines of footer.html or footer.php... Something like that. Again, every theme is different so it could be called something completely different. Sometimes, you just need to dig around.
Please also consider that your footer file may also be contained in a sub-directory in your theme folder. So make sure you have a proper look before deciding to "call off the search".
Anyway, once you've found your footer file (Whatever it's called), you'll want to open it and find the image.
If the image is inserted as a HTML reference of location, you can find it by Ctrl+F and typing in the name of the image file. E.g. "footer.jpeg" or whatever.
If the image is inserted as a PHP relative reference, e.g. "$FooterImage" then don't change that, instead, find out where the variable is pointing to in terms of the file-path, and go and edit that image file via FTP instead. You don't have to keep the PHP variable, but I'd keep it in for code-integrity purposes.
Tip for the future: Please include information like name of theme and Moodle version. It enables us to help you better.
Clean Theme:
Things are a bit different with Clean Theme as it doesn't have a single footer file.
You need to go into all layout files one at a time.
Look for this div:
<footer id="page-footer">
...
</footer>
In this footer, you will find a PHP command that says:
echo $OUTPUT->home_link();
To remove the logo, remove this line.
To replace the logo, you can either:
Replace the "home_link" reference in PHP to point to the new image file.
Or
Remove the PHP line and replace it with
?><img src="link_to_your_image" alt="Logo"><?PHP
Remember, you will need to do this for all layout files.
Have a look at Footer replacement at the official Moodle Documentation. Hope that helps.

How do I view the source of Markdown files on Github?

Github helpfully renders Markdown (.md) files to HTML when viewing on github.com (for example, this README.md).
When viewing any other source file, it is shown as unrendered source code (for example, this .gitignore). A handy feature this gives is linking directly to a line in the source by clicking the line number (for example, like this).
How can I view the unrendered source of Markdown files on Github (so I can link to a particular line in the source)?
note: I know of the "Raw" button, however it does not provide any of the nice UI Github has.
If you don't want to use the "raw" button, you can (since June 2021) add ?plain=1 to your GitHub markdown file URL:
Appending ?plain=1 to the url for any Markdown file will now display the file without rendering.
As with other code files, it will also show line numbers, and can be used to link other users to a specific line or lines.
For example, appending ?plain=1#L52 will highlight line 52 of a plain text Markdown file.
Example:
https://github.com/git/git/blob/master/README.md?plain=1#L49-L51
Since Sept. 2021, there is a button which adds the ?plain=1 for you:
Use the "Raw" button. For instance, if you were looking at README.md there is a Raw button in the Navigation. This can be simple URL change (from blob to raw), but in this case becomes a separate link.
Edit: There is no "pretty" view for the Markdown source. There's the converted HTML view, the Raw view without the UI, and the Blame view. Only the Blame view provides you with the ability to link to a specific line within the source.
Edit 2: The other option is to use Anchors within the README.md. If you take the Installation title for example, you can directly link within the content of the Markdown file. Assuming you don't have anything hidden within the Markdown itself, this is closer still to solving your original question.
Using the "Blame" button, you are able to see the source of the Markdown (for example, like this).
Unfortunately, "Blame" comes with extra UI elements which make the source more cluttered.
Refined Github provides an additional "Raw" button to view the raw source and link to a specific line:
I ran into this issue, as a complete surprise to me, on a file with a .wiki extension. It appears that files with .wiki, .mediawiki, and .wikitext extensions are recognized and rendered as HTML, with a table of contents even. I guess it makes sense, what with GitHub projects having wikis and all.
That's nifty, but this one particular case, I really wanted the raw wikitext to be visible and copy-pasteable, not some rendered representation of it.
The only half-way solution I found was to use a bogus file extension that isn't one of the ones recognized by GitHub, and then a .gitattributes to tell GitHub how to syntax highlight it, e.g.:
*.wiki_ linguist-language=mediawiki
I'm not thrilled about this, but all the good extensions were already "taken" according to the languages.yml linked above.

iPhone MoveMe Example - trouble with DisplayStrings

I'm starting to play a bit with iPhone applications and I downloaded the MoveMe example from the apple web page.
I managed to run the app, however I do not get the strings displayed. I noticed that the DisplayStrings.strings file, although it exists in the app folder, does not appear as one of the resources.
I tried adding it as a resource, but then after compiling I get an error saying "copystrings failed with exit code 1". I cannot find anything online regarding what the origin of this problem is...
The file itself is in utf16 (big endian), and contains simply a list of strings separated by new lines.
Any ideas?
Thanks.
I was having the same problem and as a workaround I renamed DisplayStrings.strings to DisplayStrings.data and added it as a resource. I then modified init in PlacardView.m to use the new filename. This made Xcode happy.
I fixed this by adding the DisplayStrings.strings file as a resource. However, when you do this it defaults the type to 'text.plist.strings' which is incorrect, since the file is just text. So, right click on the DisplayStrings.strings file in resources and change the type to 'text'. This solved the problem for me.