The quickest way to add RestAPI to your Yii 2 app. Part 2

As explained in the previous article, the example given in Yii 2 Guide about turning regular MVC apps into RESTful one is of a low quality, as it mixes certain things (refer to the previous article for details).

This article deals with this problem and show how to enable REST in Yii 2 Advanced Project Template by adding REST UserController directly to frontend application in that template and thus allowing to server User model through RESTful approach.

Read More “The quickest way to add RestAPI to your Yii 2 app. Part 2”

Reducing PowerPoint presentation’s file size using brute-force method

Since Microsoft is Microsoft and the software produced by this company may surprise you in many ways, it may happen that the ideas given in the previous article turn out to be not enough. And file size of your PowerPoint presentation will still be too big.

In this case a more brutal method is needed.

Since every Microsoft Office document is in fact a .zip archive, we will try to reduce file size by direct modification or manipulation of the content of this file.

Read More “Reducing PowerPoint presentation’s file size using brute-force method”

The quickest way to add RestAPI to your Yii 2 app. Part 1

The example given in Yii 2 Guide is of a low quality, because it It requires User model based on database, not a file. And the guide mixes two things together:

  • Yii 2 Basic Template, which is used in this example, has User model, but based on itself (on a file — list of users is given as an array)
  • Yii 2 Advanced Template has User model based on database, but it uses a multi-application concept in the same time and adding REST support, like shown in this example, isn’t possible.

As an effect, people who just starts their journey with Yii 2 and REST are often confused and finds official example not working in their side.

This article deals with this problem and show how to enable REST in Yii 2 Basic Project Template by using some model (database-based) other than User model.

Read More “The quickest way to add RestAPI to your Yii 2 app. Part 1”

Convert IMG ↔ ISO and other disk image types

To not make our lives too easy, Microsoft decided to distribute offline installers for Windows 11 in well known .iso format while shipping Office 365 offline installation images as .img.

I don’t like the other format and I don’t have any software to work with it, so I needed to find a way for converting .img disk image format into .iso image.

Various methods and issues around this are discussed in this article.

Read More “Convert IMG ↔ ISO and other disk image types”

Reduce PowerPoint presentation’s file size in easy steps

In these days we want to have our PowerPoint presentations “rich and beautiful”. Cool fonts, soft backgrounds and a serie of animations or transitions that pisses-off everyone except presentation’s author are just not enough. We want to have many beautiful images do depict our presentations. Maybe we even want every slide to have different fully photographic background etc.

This is especially true given the fact that there are many services like pixabay.com which offers you hundreds of thousands of beautiful photos completely royalty-free.

However, there’s a well known problem with PowerPoint. If you add any filter or modification to the image placed on some slide, it will be internally saved as PNG format irrespective of the actual format that source image has!

For example, I had a tiny, 9-slides presentation, where each slide had a different full-page photo as a background. Because images were too bright (overlying slide’s text was hard to read), I applied a -40% brightness filter to each image. All my nine source images were saved as JPEGs and took only 1.50 MB on disk. But PowerPoint presentation using them had… 18,1 MB! Over ten times more. And I had to implement a serie of steps to prevent that.

Read More “Reduce PowerPoint presentation’s file size in easy steps”

Customize how Office starts or default Office templates

You can have customized document (Word), workbook and worksheet (Excel) or presentation (PowerPoint) opened up as default whenever you start corresponding Microsoft Office application.

In this article I’ll be talking a little bit about file name, content and location for each of three key Microsoft Office components. That is, what to store, where to store and how to name a file.

Read More “Customize how Office starts or default Office templates”