Ubuntu Server distribution update via SSH over the internet

Standard

I have been using Ubuntu Server for development for over 10 years now. Although I am always using LTS distribution, which is supported for 5 years, there will be a time when the server needs an update only because server software needs some refresh (especially LAMP stack). Of course there is an another way – just compile new version, but in my experience this will screw up your installation (believe me – I tried).

Making distribution update on a desktop is relatively easy process – just use “Upgrade Manager” to start the upgrade procedure, sit down, relax and wait until upgrade is finished. Upgrade via SSH is much more complicated – there is no GUI to help you and SSH connection may drop any time leaving you with a server, which is half-working.

Continue reading

Reading binary data using jQuery Ajax

Standard

jQuery is an excellent tool to make web development easy and straightforward. It helps while doing DOM manipulation and makes Ajax requests painless across different browsers and platforms. But if you want make an Ajax request, which is giving binary data as a response, you will discover that it does not work for jQuery, at least for now. Changing “dataType” parameter to “text”, does not help, neither changing it to any other jQuery supported Ajax data type.

Problem here is that jQuery still does not support HTML5 XMLHttpRequest Level 2 binary data type requests – there is even a bug in jQuery bug tracker, which asks for this feature. Although there is a long discussion about this subject on the GitHub, it seems that this feature will not become part of jQuery soon.

Continue reading

Creating basic JavaScript encryption between Frontend and Backend.

Standard

One big problem with JavaScript is that it is very hard for a developer to hide JavaScript code and to create secure data transfer between browser and server. It is always possible for someone to check XHR transfers and this makes data transfer very unsecure.

I had to deal this problem, because I had to develop sweepstakes application , which gave prizes to the user live. To make this happen I had to make secure session exchange between browser and server to synchronize FrontEnd and BackEnd.

Continue reading

Watch out for hidden SPAM on your WordPress site!

Standard

Recently I had a case where my client reported me about suspicious links on his corporate website which was built using WordPress. Immediately I was thinking that site got hacked and I was preparing myself for gruesome backup tasks.

Luckily this attack was easy, although very clever. It just changed header file and included another file which was masqueraded as part of WordPress and it was placed into wp-includes directory. File name was class-ajax.php, which is very similar to another files in this directory.

Continue reading

About

Standard

This website is built for engineers, product managers, architects and others deeply interested in various topics about Java, API design, Linux and computer science in general. I hope that articles posted here will be useful for someone.

After many years in the industry, I decided to log my ideas and give something back to the community. After all – most engineers started their careers from StackOverFlow or reading private blogs like this one

Continue reading