Category Archives: Web Development

From XHTML to CSS to PHP and everything from web security and usability etc.

jQuery Steps plugin broken on Safari 11 when content has the $ character

We are using an old plugin called jQuery Steps in one of our important page. We received reports that the page is not working on a Mac High Sierra using Safari 11. I fired a BrowserStack test and found out … Continue reading

Posted in Web Development | Tagged , | 2 Comments

RubyMine 2018 theme is too flat, how to bring back the old theme?

So if you just installed the latest RubyMine for 2018 and installed the Material UI plugin, the whole RubyMine interface will use the Material design for the UI which means, everything is flat. If you don’t like it and prefer … Continue reading

Posted in Personal Blog, Web Development | Tagged | Leave a comment

Inserting page breaks for printing or PDF via HTML

So we have a web invoice which is also converted into PDF. When line items section becomes too tall (so many items), the generated PDF from HTML (via wkhtmltopdf) breaks some of the lines in the summary section and is … Continue reading

Posted in CSS, Web Development | Tagged , , | Leave a comment

HTML to PDF – Using custom web fonts

We currently have a working HTML to PDF converter in our project usually used to generate PDF invoices. However, a new requirement requires using a font not usually found on the stock fonts. At this point, I realized that our … Continue reading

Posted in CSS, Web Development | Tagged , , | Leave a comment

Rails 5 – API Only – Enable Cookies and Sessions

So you’ve been trying a lot of trial and errors just to enable cookie based session on a API only rails app? Are you trying to customize the cookie expiration but it simply defaulting to default session only cookies? The … Continue reading

Posted in Ruby, Web Development | Tagged , | 1 Comment

Rails 5 – Self Join belongs_to – entity must exist error

Wow, this is my first post for Ruby on Rails and Ruby in general! So what I’m trying to do is very simple: create a self join relationship for the user table like a parent/child relationship. However, Rails always complains … Continue reading

Posted in Ruby, Web Development | Tagged | 3 Comments

Docker – AWS S3 PHP Uploads – [curl] 6: Could not resolve host – DNS issues

Last night when I was trying to upload a new profile pic in our app, S3 uploads suddenly stopped working. Other S3 API methods are working fine except for the upload or PUT method. I have done many changes on … Continue reading

Posted in Web Development | Tagged , , , , , , | Leave a comment

Whipping some anonymous function in PHP

My goal is to validate a $_FILES array where uploaded file is an array of files. Due to the weird format of the $_FILES array for array version of the upload file, I have to validate each fields so that … Continue reading

Posted in php, Web Development | Tagged , , , | Leave a comment

Application running on Docker container – Part 2 – Database

This is a continuation of our previous post regarding a simple application running inside a Docker container. This post focuses on the database part of the application stack. Yes, we run the database in a separate container! MariaDB I’m using … Continue reading

Posted in Database, Linux, Web Development | Tagged , , | 4 Comments

Liquibase – Source control for your database

Many PHP, Python and Ruby frameworks already have their database source control feature either built-in or supported as a plugin. In our case, we didn’t use (PHP) CodeIgniter’s built-in database migration tool nor use any migration tool at all until … Continue reading

Posted in Database, MySQL, Web Development | Tagged , , , , | Leave a comment