Blog
JavaScript Snippet – Unicode Emoji As A Favicon
Would you like to learn how to easily set a unicode emoji as a favicon on any web page with a few lines of JavaScript? Check out this short video! Here is the GitHub Gist:
Would you like to learn how to easily set a unicode emoji as a favicon on any web page with a few lines of JavaScript? Check out this short video! Here is the GitHub Gist:
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. Read more…
Have you ever needed to get any user’s GitHub avatar just based on their username? If you have then you are in luck because the process is quite simple. All you need to do is place the username in the following URL: https://github.com/<REPLACE_WITH_USERNAME>.png Simple Example For instance my username is Read more…
Let’s say that you want the following JavaScript to run directly in a WordPress post: To execute that you can write the following into your post: The resulting of running the above in a WordPress post is this: As you may have noticed, since I am using document.write(…) to write Read more…
Google Sheets is a pretty simple way to make free spreadsheets and to quickly store data. Did you know that you can actually retrieve this data via JSON & JSONP? Here’s how you can do it in just a few easy steps: Open the desired Google Spreadsheet. Go to File Read more…
I just started a job that is using Bootstrap v4. I’m happy with the functionality but I miss having a not so plain looking button. Here is the CSS code I am using to add easy gradients on my Bootstrap v4 buttons: Here are some example buttons to show you Read more…
Recently I have been working on making a simple snake game and wanted to know what my options were for capturing keyboard events other than simply adding event listeners to the body, document, or the window. Amongst the obvious reasons for avoiding adding event listeners globally, I just want to Read more…
WARNING: This post is intended solely to educate and is not to by any means encourage that anyone use this method to globally evaluate JavaScript code. Most JavaScripters avoid eval(), especially globalEval() (like what is provided in libraries such as jQuery), as if it were the plague. Its use can Read more…
Let’s say that you have an array of arrays that is dynamically generated and you would like to provide a download link/button to download it as a CSV. How would you go about doing it? Ordinarily you would go about sending the data to the server which would then be Read more…