I'm speaking at Prairie.Code() 2019!

I’m happy to announce I’ll be speaking at Prairie.Code() on September 13, 2019! The conference will be held at the Holiday Inn Conference Center near the Des Moines airport.

I’ll be speaking on Secure by Design and how you can ensure security throughout development of your application. I’ll cover some of the OWASP top 10, best practices, and things my team has implemented at work. I’ve given a version of this talk at Iowa Technology Summit, DevOpsDays Des Moines, and Connectaha, but this will be the best version yet.

Registration is open now, so don’t delay in getting your tickets. Once they’re gone, they’re gone!

read more

VS Code hide open editors pane

If you’d like to hide the open editors tab in VS Code, especially useful if you’re trying to open multiple files in a folder at once and it keeps pushing the list down, you can open up settings Ctrl + , and search for openeditors and set the number of editors shown in the open editors pane to 0.

read more

ColdFusion Removing duplicate values from a list

To get the number unique values from a list you can create a Java set, which does not allow duplicate values

createObject("java", "java.util.HashSet").init(listToArray(valueList(eventsQuery.event_id))).size();

The init values requires a list, so if you already have a list, you can just pass that in to return a Java set object. You will need to convert the set back to a list to make it easy to work with in ColdFusion although you could iterate over it if you’d like. Here’s the easiest version.

listWithDupes = [1,2,3,1,3];
noDupes = createObject("java", "java.util.HashSet").init(listWithDupes);
noDupesArray = createObject("java", "java.util.ArrayList").init(noDupes);
writeDump(noDupesArray); //returns 1,2,3

read more

Detecting a Credit Card number in a field using JavaScript

Given a field such as <input id="notes" type="text" names="notes"> You can detect a Credit Card number using the following in jQuery. This will detect 15 or 16 digit credit card numbers because of the d{3,4}. To only detect 15 or 16 change that to be only d{3} for 15 or d{4} for 16.

$('#notes').on('input', function() {
    const ccDetected = $('#notes').val().match(/\b(?:\d{4}[ -]?){3}(?=\d{3,4}\b)/gm);
    if (ccDetected) {
        alert('don''t use credit cards!');

read more

Update LibreELEC to version 9 for Kodi 18

Kodi version 18 has been released as has LibreELEC version 9.

If you’ve checked for updates on your Raspberry Pi and nothing is showing here’s the solution.

  1. Go to the LibreELEC Add-On
  2. Change Automatic Updates from Auto to Manual
  3. Enable Show Custom Channels and then disable it
  4. From the Update Channelmenu chooseLibreELEC-9.0
  5. Go to Available Versions
  6. Install 9.0.0 (or the latest)
  7. Turn Automatic Updates back on
  8. Repeat when LibreELEC version 10 comes out

read more