Knowledge Base
An archive of my personal knowledge base (created and saved as a blog).
Website Validation, Speed and Performance Optimization
A list of links with speed tests, tools and techniques to optimize page speed and the overall website performance.
Enable browser caching with .htaccess file
Optimize the site performance by enabling browser caching with .htaccess file.
RESTful Java JAX RS Exception Handling
Errors can be reported to a client either by creating and returning the appropriate Response object or by throwing an Exception.
SMTP, IMAP and POP3 Email Ports and Servers
A list of default (and for some specific providers) SMTP, IMAP and POP3 email settings (ports and servers).
Regular Expressions (regex)
A regular expression (regex) is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings, or string matching.
Basic Linux Commands
A list with some basic (maybe most used) Linux commands, what they do and their syntax, and also some usage examples.
CSS Font Size (px vs. em vs. percent vs. pt)
The font-size property sets the size of the text. There are four different units for the font-size value: px, em, percent and pt.
Options, Settings, Preferences, Configuration
There's no one single consistent style followed by all applications, but doesn't really matter so long as the expected audience understands what you mean.
How to Set Chrome As Default PDF Viewer
Right click on any PDF file, and select the 'Open with' item on the menu.
Async and Defer (non-blocking JavaScript with HTML5)
A script tag causes the browser to halt rendering, load a file, and run the code (the script will be executed before parsing is resumed).
How to Change the Logon Screen on Windows 7
It is possible to change the welcome screen that appears when you start your computer also without any third-party software, but this setting is well hidden.
The JVM Architecture
The role of the JVM is to read the Java application through the Class Loader and execute it along with the Java API.
Design Patterns - Overview
A design pattern is a common, well-described solution to a common software problem. Sensible use of design patterns results in increased code maintainability.
API vs SPI
API is a mean for accessing a provided service/function, SPI is way to inject, extend or alter the behavior.
Cron Expressions Tutorial
Cron expressions are used to configure the scheduling of automated processes (for example to run periodically at fixed times, dates, or intervals).
Basic Package Management on Linux Debian
Repository based package management operations on the Debian system can be performed by many APT-based package management tools (like apt-get and aptitude).
DokuWiki URL Rewriting in Apache
By default, DokuWiki does no URL rewriting, resulting ugly URLs (http://server.com/doku.php?id=page) and not indexed well.
PHP - List Files and Directories
The older way is scandir but DirectoryIterator is probably the best way. There's also readdir (to be used with opendir) and glob.
Parse Files Recursively using Java 7+
A FileVisitor can be used to recursively visit all the files in folder. The interface specifies the required behavior at key points in the traversal process.
Gmail advanced search operators
Advanced search operators are query words or symbols that perform special actions in Gmail search.
Set the Look and Feel in Java
How to change the look and feel of Swing applications. The 'look' of an application refers to its appearance. The 'feel' refers to how the widgets behave.
Java Cryptography
Cryptography is looking at techniques for encoding and verifying things securely. It tends to focus on encryption, authentication and computer protocols.
java.lang.UnsatisfiedLinkError no ***.dll in java.library.path
The UnsatisfiedLinkError is thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
Do not catch NullPointerException or any of its ancestors
A NullPointerException exception thrown at runtime indicates the existence of an underlying null pointer dereference that must be fixed in the application code.
Extract MKV (Matroska) subtitles on Linux Ubuntu
Use MKVToolNix (a cross-platform set of tools to create, alter and inspect Matroska files) to find and extract the subtitles (and fonts).
XStream - Object references
To deal with duplicate and circular references, XStream is using XPath to allow serialized objects to be treated as graphs instead of simple trees.
XStream - Quick start JSON tutorial
Quick start tutorial on serializing an object to JSON (and deserializing back from JSON) using XStream, a simple java library.
XStream - Quick start tutorial
Quick start tutorial on serializing an object to XML (and deserializing back from XML) using XStream, a simple java library.
Portable SVN Repository
An easy way to transfer the code when developing on different systems is to use a flash drive (or a file hosting service) as a subversion (SVN) repository.
Install Eclipse on Linux Ubuntu
The recommended way to install Eclipse on Ubuntu is using the distribution's package manager, but the Ubuntu distribution contains a very old version.
Install Maven Repository on Linux Debian (Sonatype Nexus)
Instructions for installing and configuring Nexus Repository Manager as a service (so it starts back up after server reboots).
Install Proxy Server on Linux Debian (SQUID Web Proxy Cache)
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It runs also on Windows and is licensed under the GNU GPL.
Install FTP Server on Linux Debian (vsftpd)
vsftpd is a GPL licensed FTP server for UNIX systems, including Linux. It is secure and extremely fast. It is stable.
The Singleton Pattern
Singleton pattern is a design solution where only one instance of a class is created, and provide a global point of access to the object.
Install Java (OpenJDK) on Linux
How to download and install prebuilt OpenJDK packages (Java Runtime Environment or Java Development Kit) in various Linux distributions.
Install Java (Oracle) on Linux Ubuntu
How to download and install Sun/Oracle's proprietary Java (Java Runtime Environment or Java Development Kit) in Ubuntu Linux distribution.
HibernateException - A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance
Hibernate is unable to track changes to a newly set collection (as a new object) and thus has no idea how to apply the cascading persistence to your objects.
Hibernate - One To Many (Annotation)
One-to-many associations are declared at the property level with the annotation @OneToMany.
Hibernate - Entity Superclass (@MappedSuperclass)
The solution to code repetition (like for example wiring an id field in every Hibernate entity) is to inherit these properties from a superclass.
Install Google Chrome on Linux Fedora
Best way to install and keep up-to-date with Google Chrome browser is to use Google's own YUM repository.
Install Google Chrome on Linux Ubuntu
Best way to install is to add the Google Chrome PPA to repository and to install using the 'apt-get' command.
Mount VirtualBox shared folders on Linux
A shared VirtualBox folder allows to easily share files between host OS and guest OS. This guide shows how to mount the VirtualBox shared folder on Linux.
Linux - Mount a CD-ROM or DVD
How to create CD and DVD mount points in Linux (common CD mount points are /cdrom and /mnt/cdrom and common DVD mount points are /dvdrom and /mnt/dvdrom).
Install bash-completion package on Linux
The programmable completion feature in Bash permits typing a partial command, then pressing the [Tab] key to auto-complete the command sequence.
Linux - Set up HTTP proxy for GNU Wget (wget)
To make GNU Wget (wget command) work behind a proxy, 'wgetrc' (which is found in '/etc/' directory) file must be edited.
Linux - Set up HTTP proxy for APT (apt-get)
To make APT (apt-get command) work behind a proxy, 'apt.conf' (which is found in '/etc/apt/' directory) file must be edited.
Software Development Roles
Each of the software development processes may change to some extent, but fundamentally there are some roles which every process has in one form or another.
Code Review
Code review is a phase in the software development process to catch bugs and design errors before the code becomes part of the product.
Disable browser caching with meta HTML tags
The minimum set of HTML headers to disable browser caching that works across the most important browsers: Cache-Control, Pragma, Expires.
Upgrade Samsung Galaxy S2 to Android 4.0.4
The instructions in this guide are for upgrading the Samsung Galaxy S2 GT-I9100 to Android 4.0.4 build XXLQ5.
Root Samsung Galaxy S2 on Android 4.0.4
The instructions in this guide are for rooting the Samsung Galaxy S2 GT-I9100 on Android 4.0.4 build XXLQ5.
Multiple properties files in Spring context XML
Spring allows to externalize string literals in its context configuration files into external properties files.
Spring - Quick start tutorial
The Spring Framework is an open source application framework and inversion of control container for the Java platform.
Share