• Programming,  Python

    Python script to identify CIDR notation

    It’s not uncommon to expect CIDR notation vs an IP address in a script (e.g. one that’s being passed to another API. So the following script is an example of using the re module to identify if an entry is in CIDR or not (since it’s not always obvious how to go about doing so): The array can easily be changed or filled with a network mask or array of them rather than fixed as they are here – and the output could easily be to call another function rather than to just print output.

  • Consulting,  sites,  WordPress

    Leveraging jQuery for Input Validation

    jQuery is the most popular JavaScript library in use at this point, finding its way into something around 20% of the largest websites in the world. One of the main reasons for this is that much of jQuery is meant to allow for working between JavaScript and Ajax. As such it often ends up getting used for graphical interfacing. One interesting use for graphics is to only allow someone to actually enter specific characters into fields. It is common to leverage input validation, but typically this includes validating the data that is submitted from a form; however, using jQuery, there is an AlphaNumeric script that only allows the use of…