• Virtual Box Tips

    Mount a shared folder on a linux (Debian) guest: Make sure you have already installed the Virtual Box Guest Additions. Set up a ‘transient’ folder via the Virtual Box GUI (Devices > Shared Folders) In a terminal window in the linux guest, run: sudo mount -t vboxsf name_of_shared_folder_in_VBox ~/directory_in_guest_os/

  • How to use reserved characters in a URI

    If you have to encode a reserved character (such as ‘/’ or ‘@’) so that it can be passed in a URI path, you may need to encode it twice: Example: const ticker = ‘@SMC/2018’, encodedTicker = encodeURIComponent(encodeURIComponent(ticker)), uri = `https://someexample.io/${encodedTicker}/load`; See also: “When to Encode or Decode” if you like to be confused.

  • WordPress Security: How to change the WordPress database prefix

    This is an example of ‘security through obscurity‘. This assumes you’ve already installed WordPress. Backup DB Make a backup of your WordPress database. Edit wp-config.php Edit this line in file wp-config.php: $table_prefix = ‘wp_’; so that ‘wp_’ has some long random string made of up of lowercase letters and numbers appended to it, followed by more

  • Recursion Examples

    Recursion in programming can be a mind bender.  Here are two examples of recursive functions coded in JavaScript.  These examples are dependent on lodash methods. Hopefully these code patterns are useful to you. I find them useful as starting points when I have to code some new recursion.   This function, “omitDeep” deletes an object more

  • GIT Commands Cheat Sheet

    A cheat sheet of git commands that I use the most, and also of the ones I use the least (which is really much more important to have on a cheat sheet).