Create thumbnails with php

Posted in PHP, Jun 1 2018
Create thumbnails with php

A script to create a thumbnail image from source image using PHP GD and Image Functions - create a new image from file or URL, (PHP 4, PHP 5, PHP 7).

Check if php is running from command line interface (cli)

PHP scripts are usually opened in a web browser. But they can be run from command line or terminal as well.

Enable or add a network interface in Ubuntu Server.

Enable or add a network interface in Ubuntu Server.

Javascript Image File Reader: readAsDataURL(image)

File objects may be obtained from a FileList object returned as a result of a user selecting files using the element, from a drag and drop operation's DataTransfer object, or from the mozGetAsFile() API on an HTMLCanvasElement.

Starting a process remotely with nohup command

Every process which starts from a terminal is tied to shell as a child process from which it was executed. When the parent program is terminated the child process will be terminated, this is not particularity desired behavior when a user needs to run a process remotely and keep the process running after logout, for this reason a nohup command exists...

PHP - Get filename from file path

PHP pathinfo(), returns information about a file path, from php 5.2.0 PATHINFO_FILENAME constant was added which returns the filename from file path with the file extension removed. Example and reference provided.

PHP class - get uri segments

Posted in PHP, Jul 10 2016
PHP class - get uri segments

A Model View Controller(MVC) PHP class to get uri segments which returns a string on success or bool false if key is not found.

Implementing CSS scroll behavior

The scroll-behavior CSS property specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs. Any other scrolls, e.g. those that are performed by the user, are not affected by this property. When this property is specified on the root element, it applies to the viewport instead.

Windows 7 bootable USB installer howto

Create a bootable USB drive Win7 installer from the command line using Diskpart howto.

Sticky Header on Scroll with CSS, Javascript and RAF

Having a fixed navigation bar which is always visible to the viewer is a nice feature which gives quick access to the site content and search engine without the need to scroll back to the top of the page. In this article an example is provided using requestAnimationFrame(RAF).