Unable to attach certain file types to MoinMoin page? - moinmoin

I configured a a local MoinMoin server and am trying to attach an excel file to a page. Upload for cpp, ods and txt files works fine but pdf, exe, doc, xls and xlsx files DON'T get attached. Once I click the 'upload' button, I get redirected back to the wiki page. When I go back to the Attachments sections I don't see the file attached to the page.
(Running MoinMoin 1.9.3 + Apache2.2 on Windows XP.)

Workaround:
It seems to be an issue only when moin python scripts are called as CGI scripts. I switched to using WSGI in Apache (following instructions from http://code.google.com/p/modwsgi/wiki/IntegrationWithMoinMoin) and am able to upload any file.

Related

Group policy to make Chrome open files automatically after download

I am in the process of updating our currently existing Chrome distribution so that when a user downloads a .pdf file, the file is opened automatically.
As a first step, I was able to prevent Chrome from opening the pdf in its internal pdf viewer and could do a registry entry by using AlwaysOpenPdfExternally. This way it was downloading the file immediately and not opening it in the Chrome viewer.
I'd like to use Adobe to view the file automatically after download.
Unfortunately I was not able to find a registry entry. Nor was I able to find a GPO entry to be changed for Chrome.
I had found the following PowerShell script to be started upon logon of the user. However, testing it did not give me the result I was looking for.
The given entry extensions_to_open was not existing even after starting the script.
The current version of Chrome used is 66.255.
I would be happy for any help.
Edit: I am able to get the file to be opened automatically by inserting the given line here:
Is there any way to programatically force "Always open files of this type" for a specific file type in Chrome?
however, I am unsure of how to distribute the line of code into every PC in my network.
Edit: Chrome offers Group Policy Templates which should be importet into the active directory of your Windows Server. Once imported into your GPO, Chrome offers the setting: "Always open Pdf files externally". Once you check this feature, file should not automatically open in the internal PDF viewer.
See second edit: import the latest group policy templates into the GPO (will be stored on the active directory). After that, go into the GPO policies for "Google Chrome" and check the feature "Always open PDF files externally".

Host reveal.js slides (.html) [Jupyter notebook export] as webpage on non local server

I am currently working on a Jupyter Notebook.
I managed to export it as reveal.js slides (.html) and host it on my local server. I used the following command line in the terminal:
jupyter nbconvert <mynotebookname>.ipynb --to slides --post serve
It generates a <mynotebookname>.slides.html file and opens it in my browser, where I can navigate properly through the slides (as seen in this example on https://revealjs.com).
However, if I upload this file to my 'web' folder at my University's server (where I usually upload any html files that I want to see as a webpage) I get a single scrollable page with the content of my notebook. It doesn't present the same slide perspective as on the local server.
I would like to make it available as a webpage so that I can share it with other people.
What am I missing?
I finally managed to find the solution by using the command below:
jupyter nbconvert <mynotebookname>.ipynb --to slides --reveal-prefix "https://cdn.jsdelivr.net/npm/reveal.js#3.6.0 "
This way the generated slides.html file will render the slides correctly in your browser, whether the file is on your local machine as a standalone file or at a webserver/github/bitbucket being displayed as a webpage.
I wasn't aware that when not using --post serve it is necessary to point the reveal-prefix to some reveal.js library available at a CDN (content delivery network). Apparently --post serve does that for you. As an alternative it is also possible to point to a local reveal.js library.
Here are some links that helped me reach this solution. They contain some additional commands that may be useful while converting your notebook to slides.
https://github.com/jupyter/nbconvert/issues/157
https://medium.com/learning-machine-learning/present-your-data-science-projects-with-jupyter-slides-75f20735eb0f
https://github.com/jupyter/nbconvert/blob/master/docs/source/usage.rst
http://www.damian.oquanta.info/posts/using-a-local-revealjs-library-with-your-ipython-slides.html

Using Eclipse/Aptana, points to wrong location when previewing in browser

I'm just starting out with Eclipse Luna with Aptana plugin installed.
I've just written a basic .html file, and when I run the page using the built-in web server, it opens Firefox with the following URL:
http://127.0.0.1:8020/RemoteSystemsTempFiles/opening_page.html
This is unsuccesful, with Firefox displaying the message: Unable to connect
Whereas I have the file stored elsewhere on my hard drive. how do I point it in the right direction?
Thanks.
I found you can find the html file in your file explorer and open it manually or just type in the location the file is stored at on your hard drive into the address box. This worked for me with a html file and a css that changed the color. I am not sure if there is a setting somewhere to change the path it enters into Firefox.

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/

Files on my WebDAV mapped drive output rendered files in IDEs instead of actual content

On my mac I mounted a shared drive using WebDAV by going to "Finder > Go > Connect to server".
Now, when I try to view the files using TextWranger or TextEdit I can see the PHP code that I want to edit.
However, if I try to use an IDE like NetBeans/Eclipse/TextMate and create a new project with my shared drive as the "Existing sources" folder I cannot see the PHP code.
Instead I see the HTML output of the files as if I were seeing them through a web browser. Also, if I try to view a file that isn't normally accessibility (a command line script) I see the output as if it were called from the command line.
But a weird thing is if I use TextMate to edit a single file from the shared drive I can see the php code I am trying to edit. It just doesn't work as a project.
Any suggestions or solutions on how I can use an IDE to edit files over WebDAV? And why do my IDEs display the content rendered, instead of the actual file on the file system.
I'm not a specialist at all but I seem to remember that WebDAV clients do send GET requests.
If I'm correct your server may not be able to discriminate between HTTP GET and WebDAV GET thus rendering your .php files. Why this would work that way when working with a project and another way while working with individual files is not clear, though.
Do you get rendered files when you add files to your project manually as well?