snippet - Filename from path in PHP
22 Nov, 2016
Snippet shows you how to get filename from a path in PHP. Filename and extension separately. Can be used for extending filenames with timestamp or anything.
snippet - Select a random file from directory in PHP
22 Nov, 2016
Select a random file from directory. This can be useful if you want to display a random image on your website. For an example a background image randomly from a directory in your files.
snippet - Ansible add multiple lines to configuration file
27 Oct, 2016
Ansible add multiple lines to configuration file. Add multiple lines in your configuration file. The line will be replaced with the old one. You can set after what will the line be inserted. Use...
snippet - Delete object key and value in javascript
12 Oct, 2016
Deleting object value with key in javascript. For this you can use the delete operator. Permits you to remove a property from an object.
snippet - ArchLinux upgrade error: qt5-base and qtchooser are in conflict
6 Oct, 2016
Trying to install latest updates got an error. "qt5-base and qtchooser are in conflict" due to the error it was not possible to upgrade the system. The package moved to the base package, so they came...
snippet - Radio Buttons in MDL (Material Design Lite)
19 Jul, 2016
Material Design includes beautification of radio buttons as well. These need javascript, if you use ajax to load you content, you need to call for dom update.
snippet - Is MySQL Table empty
21 Sep, 2016
If you need to show user different content whether a table is empty or not. So you would need to count table rows for that. Counting every row will iterate through the table rows and is really slow....
snippet - Validate AJAX requests in Zend Framework
26 Aug, 2016
How to validate AJAX requests in Zend Framework. There is a function in request class, to use instead of comparing the $_SERVER['HTTP_X_REQUESTED_WITH'] directly. This can be beneficial for security...
snippet - Text Input in MDL (Material Design Lite)
8 Jul, 2016
There are multiple ways to display text input field. You can use lable or not, you can do some validation with regular expression. Also you can show pretty inline form errors. For more information go...
snippet - Ansible: Install package using yaourt
4 Jul, 2016
Simplest way to install package using yaourt is to use it in command. This simplistic method works only when it's ok to expect builder to have yaourt already installed. Just run the installation...