Blog

GitHub Gists Hack – PIBB Extension

Have you ever wanted to source a GitHub Gist within an <iframe>? Yesterday, I was writing a trainual document for work that needed to include Apex code which of course includes code that is misinterpreted as HTML ( eg. List<Object>…) after you save it and want to edit it again. […]

By Chris West, ago
Blog

JavaScript – Update HTML Code

Have you ever used JSBin or CodePen and wondered how you can accomplish something like they do on those sites? Of course, CodePen is much more advanced and has more options but if you ever want to combine JavaScript code and CSS code into a full or partial HTML document […]

By Chris West, ago
Blog

Salesforce – LWC – refreshView

When writing an Aura Lightning Component you can use the following to update data for standard components as detailed on this page: Unfortunately, with Lightning Web Components you cannot run the above code as is. Fortunately, you can easily modify the above to make it work in an LWC. All […]

By Chris West, ago
Blog

Simple CSS Loading Spinner

I recently wanted to create my own simple loading spinner with just HTML and CSS. Here is the code that I came up with: HTML CSS See It In Action Below is what it looks like in action. I added a few inputs so that you can play around with […]

By Chris West, ago
Blog

JavaScript – Async Function Constructor

In JavaScript you can create a function by using the Function constructor: The above code produces a sum() function which takes 1 or more arguments and returns the sum of them all added together. You can check out the following to see this in action: What About AsyncFunction()? You may […]

By Chris West, ago
Blog

PHP Snippet – parse_jsonc()

A few months ago I wrote a quick post showing how to parse JSONC (JSON with comments) files in JavaScript. Shortly thereafter I adapted the code to work in PHP as well: This function takes the same arguments that you can pass to the native json_decode() function. Besides removing JavaScript […]

By Chris West, ago
Blog

IO App – XML To JSON Converter

There are a lot of online converters out there that will take XML file contents and turn it into JSON. I decided to make my own and then show how simply this can be done with modern JavaScript: How Does It Work? The code which makes this work is given […]

By Chris West, ago