Blog

Git Feature Branches

Some useful command for me to remember. When working on a new feature switch back to master do a git pull to get the latest and create a new branch. git branch my-new-feature Now switch to the new branch. git checkout my-new-feature After working on you feature you can push...

Switching Control Key On Windows Keyboard

Download Autokey and install on your windows computer. https://www.autohotkey.com Right-Click on your desktop. Find "New" in the menu. Click "AutoHotkey Script" inside the "New" menu. Give the script a new name. It must end with a .ahk extension. For example: MyScript.ahk Open the script in VSCODE and add the following....

Display Desktop Notifications With ElectronJS

Quick post for a reminder on how to display desktop notification with ElectronJS. First you dont need to use node-notifier ElectronJS has it all built under the hood. View the docs here. https://www.electronjs.org/docs/latest/api/notification There are some examples here. https://www.electronjs.org/docs/latest/tutorial/notifications I'll just add to some points that are not listed in...

Testing ElectronJS With Mocha & Spectron

In this post I will be outlining how to test your ElectronJS Apps with spectron and mocha. First to get started we need to install spectron. !!!!IMPORTANT!!!!! this threw me for a while with compatibility issues go to the GitHub page and make sure you are using a spectron version...

JS Get Media Mimetype From Url

Little function to grab the mime type from a video url, using it in one of my apps will continue to add to it. function getMimeType(url) { var ext = url.split(/[#?]/)[0].split('.').pop().trim(); switch (ext) { case 'mp4': return 'video/mp4' break; case 'mov': return 'video/quicktime' break; case 'flv': return 'video/x-flv' break; case...