Author Archives: Kristijan Burnik

About Kristijan Burnik

Kristijan Burnik is a Programmer and Web Developer specializing in Server-side and Client-side Technologies and Application Development on Linux Servers and Windows Desktop . Also has experience in Networking, Desktop application development as well as Android mobile application development . Experienced in Programming Languages like Java, C, C++, C#, PHP, Javascript, MySQL and somewhat in other languages like Bash, Perl & Python. Sometimes he works as a Graphical Designer for digital production as well as for printing and advertising. He dedicates his spare time writing Tech Articles on his blog in order to share his work with others, as well as to document his projects for his own use. He's also an Educator & Mentor in field of Algorithms and Programming to young programmers in Zagreb, Croatia.

Deploying to production via FTP using GIT hooks

In this post, we address a common development task of pushing to production. This tutorial assumes you are working on linux, use GIT for version control and are somewhat familiar with python. I’ve only recently started using python for scripting and I can say it’s very friendly for these kind of tasks. Also, I assume […]

Continue reading

Developer’s guide to effective and maintainable internationalization – multiple language support in web applications

item_3 Intl flags

An interesting problem I’ve encountered many times over the years is the multi-language website feature. Given a primary language of the website with its respective database, it is pretty tricky to come up with a good way of having multiple languages for the same website and making it easy to maintain. First, let’s consider we […]

Continue reading

PHP CURL: Fetch Web Page Contents with Status Code

Basic implementation Copy-paste this function to get contents of a web served file / document from given URL. Note: CURL needs to be enabled on your system. function curl_get_contents( $url ) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return array($http_status,$response); } Usage example $url […]

Continue reading

Cleaning up your code: Find All Source Files with “TO-DO” comments in Linux Shell

Keeping track of your TO-DO‘s is not always easy! Especially if your using mostly plaintext editors for coding your scripts and programs. It’s a good habit to clean up your source code every once in a while and do what you intended with the TODO remark in the first place. Most modern IDE’s have this […]

Continue reading

Find all Executable Files in a Directory via Linux Shell

Today, we’ll show how to find files marked as executable (chmod +x) in a given directory of a linux system. Basic syntax find {directory} -type f -executable Common Examples Find all executables in current directory recursively: find . -type f -executable Find all executables in current directory while skipping subdirectories: find . -maxdepth 1 -type […]

Continue reading

Creating HTML Links with Page Titles using Raw URLs in Linux Shell

Given a plain text list of URLs (for example links in your history) you want to create a list of HTML links which have the same title as the page’s document title. Offcourse, you want to do it with a script! Example input: Example output: <a target=”_blank” href=””> :: Top work at Web […]

Continue reading

Colored Text Output in Linux Shell and Bash Scripts

This script is used in a lot of other scripts I produce over time, and it’s very handy for generating colored text output in the terminal. Example of usage Here’s an example of using the script: #!/bin/bash source echo “${fg_yellow}Yellow ${fg_reset}Normal ${fg_green}Green {$fg_reset}”; Download You can view or download the script here: […]

Continue reading