TYPO3 compression only works on js/css, not on html file itself - compression

I'm trying to optimize the pagespeed and trying to figure out what does what.
I've managed to merge and compress js/css files, so Google Pagespeed doesn't bother me with that anymore.
Now I still get the message that I can save some bytes by compressing "http://yourpage.com/" which basically means that the html/php-file itself is not compressed (I think)
Any idea how I can solve this?
Some additional information:
Using TYPO3 6.2.21 with the default .htaccess file enabled.

there is an extension for that: https://typo3.org/extensions/repository/view/sourceopt
That works very well. I use it in many projects.

Apparently I had to remove the '<IfModule mod_filter.c>' condition from my .htaccess file, now it's working. I read that my Apache version might be too old.

Related

How can I compile my ColdFusion code for sourceless distribution, and have it be unreadable?

I've been tasked with creating a deployable version of a ColdFusion web app to be installed on a clients server. I'm trying to find a way to give them a compiled version of our code, and my first inclination was to use the CFCompile utility that I found here. However, after running CFCompile, most of the code in the CFM files is still readable. The only thing that appears to be obfuscated at all is the actual ColdFusion code - all of the SQL Queries are still perfectly readable. (Example in the screenshot below)
The HTML and JavaScript are also still readable in the compiled code, but that doesn't matter as those can be seen in a web browser anyways.
Is there another way to distribute my source code in a format that is completely unreadable to the user? I'm guessing that for whatever method I choose, there will be some way of decompiling the code. That's not an issue, I just need to find a way to make it more difficult than opening the file and seeing the queries.
Hostek has a pretty good write up on the subject over on their site - How to Encrypt or Compile ColdFusion Files.
Basically, from that article:
Using cfcompile.bat
The cfcompile.bat utility will compile all .cfm and .cfc files within a given directory into Java bytecode. This has the effect of making your source code unreadable, and it also prevents ColdFusion from having to compile your ColdFusion files on first use which provides a small performance enhancement.
More details about using cfcompile.bat can be found in ColdFusion's Documentation
Using cfencode.exe
The cfencode.exe utility will apply basic encryption to a specific file or directory. If used to encrypt a directory, it will apply encryption to ALL files in the directory which can break any JS, CSS, images, or other non-ColdFusion files.
They do also include this note at the bottom:
Note: Encrypting your site files with cfencode does not guarantee absolute security of your source code, but it does add a layer of obfuscation to help prevent unauthorized individuals from viewing the source.
The article goes on to give basic instructions on how to use each.
Adobe has this note on their site regarding cfencode:
Note: You can also use the cfencode utility, located in the cf_root/bin directory, to obscure ColdFusion pages that you distribute. Although this technique cannot prevent persistent hackers from determining the contents of your pages, it does prevent inspection of the pages. The cfencode utility is not available on OS X.
I would also add that it will be trivial for anyone familiar with ColdFusion to decode anything encoded with this utility because they also provide the decoder.

How to download content from my Django webpage?

I have a table on one of my Django webpage. I want to give the user the ability to download the content of the table in xl format.
What would be an efficient and good way of doing this?
I was thinking of creating an xlsx file using the xldr library. Writing the data on the file. making the file available for download and then deleting the file at the end, so that my drive stays clean.
but it doesn't feel like a very efficient way.
I'm new in web development, so open to all kind of ideas.
Thanks
There's an example in the python doc of generating a pdf response. Apart from using xldr I don't suppose it needs to be much different, though I haven't done this. It uses io.BytesIO in-memory buffering to avoid creating temporary files, and sends that back using FileResponse instead of HttpResponse

Is there a way to display .eps (vector) files in Ruby on Rails?

I'm new to RoR and can't seem find anything that simply explains what file types are supported. I'm assuming .eps is not because it simply won't work in my app (other file types do such as .png so I know it's not some other problem), so curious if there is a workaround to get .eps images to show in a RoR app?
Appreciate any help.
Did some digging. .svg files work in Rails and they are vector images. I used an online file converter like this one to convert .eps files.
http://image.online-convert.com/convert-to-svg
Googled around and found this old project:
https://github.com/Bluejade/PrawnVectorImport
No activity for a while. They might just be done?

cPickle.load() doesnt accept non-.gz files, what can I use for .pkl files?

I am trying to run an example of a LSTM recurrent neural network that is presented in this git: https://github.com/mesnilgr/is13.
I've installed theano and everything and when I got to the point of running the code, I've noticed the data was not being downloaded, so I've opened an issue on the github (https://github.com/mesnilgr/is13/issues/12) and this guy came up with a solution that consisted in:
1-get the data from the dropbox link he provides.
2- change the code of the 'load.py' file to download, and read the data properly.
The only issue is that the data in the dropbox folder(https://www.dropbox.com/s/3lxl9jsbw0j7h8a/atis.pkl?dl=0) is not a compacted .gz file as, I suppose, was the data from the original repository. So I dont have enough skill to change the code in order to do with the uncompressed data exaclty what it would do with the compressed one. Can someone help me?
The modification suggested and the changes I've done are described on the issue I've opened on the git(https://github.com/mesnilgr/is13/issues/12).
It looks like your code is using
gzip.open(...)
But if the file is not gzipped then you probably just need to remove the gzip. prefix and use
open(...)

Django big file transfers

I am looking for a django app that can help smooth the process of uploading big size documents by using HTTP Post.
Documents ranging anything from 150mb to 500mb.
I wrote a small library that handles PDF uploads and parses it to my scribd library and through that embed it onto my site.
Currently my model is quite simple, it takes a FileField, preferably PDF and just and uploads the PDF File, through that makes use of the scribd library and send it directly to scribd for encoding.
The problem is, somewhere along the actual upload process, it times out, no errors in the log, I have adjusted my django apps size for files, Apache's size for files, and I am a bit lost at the moment not knowing where to go from here.
Although I want to eliminate the manual work, so ideally I'd still like to use it through my site.
Any help or pointers would be appreciated.
Probably a bit too late, but, have you tried django-bft