Find a Substring in a JavaScript Array

Last week a colleague asked me how to check if a substring exists in a JavaScript array and set that as a boolean flag. Assigning a boolean (or more accurately a value or 0) for the existence of a full string in an array is pretty easy, but a substring is a little different.

 

A Week with Solus 1.2 Stable

Like any good Linux geek I have lots of old hardware kicking around my house — most of it running a variant or derivative of Ubuntu. However, in recent years Ubuntu is becoming more resource hungry and doesn’t run smoothly on my older gear. Even on my 4 year old Asus K55A, with lighter desktop environments, such as Mate and LXDE, the lag and lack of responsiveness is becoming unbearable.

 

Passing arguments to a JavaScript callback function

In JavaScript, callback functions are used to perform an action or operation after another operation has occurred. The mechanics of a callback rely on the fact that everything in JavaScript is a first class object. This fact allows you to pass functions as arguments to another function. The latter function can then invoke that function at a predetermined point in the program.

 

Mount Remote Volumes on Boot with sshfs and fstab

I need to have a couple of network volumes mounted to my Linux laptop on a continual basis. One of those volumes has NFS file system so an entry in the fstab was easy enough. The other volume is a ClearCase vob on the proprietary MVSF file system. I’ve tried an fstab entry as mvfs but without success.

 

Using WordPress Featured Images in AngularJS

In part 8 of this series we will make a content service to replace our existing vanilla $http requests in our route resolves, and then we’ll make an additional service to go fetch the relevant media associated with a featured image. Then we’ll conditionally display the featured image below our post title if one exists.