united states of america usa  linkedinfacebook   Call Us Today: (786) 646-6461

Knowledge Base

A small script to capture video stream (eg: from a security camera). The script takes in time in format of HH:MM:SS and created directories based on the current date. Based on the current variables, it outputs the files to /opt/camera/recordings/. It also needs a temp directory, called streams under /opt/camera/.

Usage example (to capture 11 minutes of the stream):
capture.sh 00:11:00

gimp icon

This comes up over and over again. Accidentally drag or move a window in GIMP and then you go both panels on one side. As annoying as it may be, there's an easy way to reset the windows layout to their default location.

Open Gimp,

Go to Edit menu -> Preferences -> expand the Interface item -> Window Management -> Reset Saved Window Positions to Default Values

We've tried to install a Perl package unsuccessfully on a Mac and, as it turns out, you need to do a few things before you can run CPAN and install packages. Specifically, you need to install developer tools:

xcode-select --install

Once that installs, you should now be able to run cpan and install packages. Make sure cpan runs as a super user (ie sudo):

apple logoWhen you enable the VNC connection on a Mac, it will not let you login directly to the current user, but rather it will present you with a login screen after you've authenticated with VNC. This is convenient when you want to login to another account remotely, but not so much if you are trying to assist the current user (this is especially annoying for IT technicians, accessing the computer remotely and not knowing the user password)

apple logoThere are various ways to restart and shut down your mac. The obvious one is through the Apple menu (there's very little magic about that), but the one that is more useful is using a command line. Because MacOS is a derivative of Unix, it has many tools hidden from an average user. To restart the system using a command line, open a terminal and run the following:

apple logoQ. Hello IT Support, I know there's a feature in BIOS for PCs to be turned on after a power outage. Is there such a function in a Mac?

A. Yes, this is a useful feature to have for remote computer access. If you login with an account that has administrative privileges, you should be able to do that. Go to:

apple logoIf you want to boot from a USB (or CD) on a Mac, you can do so by putting in the bootable USB in and boot holding the "Option key" pressed (Alt key if you use a PC keyboard). Once the system starts, you will be presented with the the following set of options (or similar):

Let's say you are trying to change the permissions of some files (using chown or chmod), but you get an error:

Operation not permitted

Apple and Mac IT SupportThis is (in most cases) because the files are locked (you can verify that by going to "Get Info" for each file or directory). One way to solve it is to go through the list of permission errors and manually unlock them using Finder. A quicker way is to do it on a command line:

php logoThis is a common PHP error, which means that you are trying to access object property on a null/non-existing object. To avoid this, you need to check if the property is defined. So instead of doing something like this, which produces an error:

php logoThere's a useful function in PHP called nl2br, which breaks up a paragraph with regular line breaks and replaces them with <br /> HTML breaks. It works great, but sometimes you need to break the paragrpah into actual paragraphs, separated by <p> and </p>. The function below does exactly that - finds line breaks (\n) and encapsulates the text in <p></p> tags:

joomlaThis is a code snippet which allows to get the article modified date from an article itself. This has to be done in a template (or other code). The first part is to identify the item as article and second part to extract the modified date of the article (Tested with Joomla 2.5):

Last updated Aug 3, 2020