SonataAdminBundle has a powerful extensions feature which allows you to add or change features of one or more Admin instances. I needed my extension to change some validation rules, and it turned out that imposing different validation groups was a good way to achieve it. $formOptions attribute of Sonata\AdminBundle\Admin\AbstractAdmin class allows for setting validation groups,… Continue reading Sonata Admin: modify validation groups in an admin extension
Category: Web development
Never miss a branch again
When working with a git repository you need to know which branch you are committing to. To do that you type git status and check for the info. Sometimes you just need to know the branch in order not to make mistakes when merging. It is super useful to have branch name as part of the command prompt.
How to Convert HTML to PDF
A few years ago, generating PDF files via web server side scripts was a real nightmare. Although several libraries were available for the task, most of them were very difficult to use. Times have changed, and now days easiest approach is to convert HTML to PDF.
I wanted to change WordPress URL, you won’t believe what happened afterwards
WordPress has a nasty habit of storing absolute URLs in the database. That means that all internal paths, including images and other resources are stored in the database containing the base URL of your blog alongside the URI of the resource. It is not possible to change WordPress URL quickly. Or at least I thought so.
Let’s Encrypt – providing free automated SSL certificates
In August 2014 Google announced that their search engine will value HTTPS as a ranking signal. This is quite a good news for end-users meaning that they will get more secure sites in top search results. However, it’s not a very good news for owners of small or unprofitable websites, since they would have to acquire signed certificate to get their website a ranking boost.
Add colors to your bash shell
Unix shell is one of the most powerful tools ever created, but sometimes it can be quite dull. Adding it a bit more spice could make your day brighter and your thoughts clearer.
This can be done by setting the LS_COLORS environment variable. Best way to do it is in $HOME/.bashrc file. If done like this, color settings will be loaded each time you start your terminal.
Convert PDF to Image(s) using ImageMagick
There is a quick and convenient way to convert PDF to one or more images. Command line tool ImageMagick does that (and a lot more). You can convert an entire PDF document to a single image, or, if you like, there is an option to output pages as a series of enumerated image files.
Disable updating of WordPress plugin or theme
There could be multiple reasons for disabling updates of plugin or a theme. For example, in time constraint, you have reached for desperate measures and edited the source of a third party plugin or theme. Now, that is the practice that is bad on so many levels, but sometimes you just have to deliver in time, no matter what.
Introduction to Databases
In my profession it is important to always sharpen your skills. Although I’ve been working with relational databases for more then 10 years now, I decided to take another online course at Stanford University: Introduction to Databases.
I heard praises about Coursera from a friend and a colleague who finished the Stanford’s course Introduction to databases on the same platform. I thought to give it a try and after searching through it’s extensive list of courses, I found one that has drawn my attention. It was Startup Engineering, also from Stanford.