» Setting up Audio Loopback in an Ubuntu VM on Parallels

March 21, 2019 - 5 minute read

Introduction

Over the past few months, I have become the Dungeon Master for my online Dungeons & Dragons group. We currently use Roll20 as our Virtual Tabletop, D&D Beyond for character tracking, and Discord for voice chat.

Originally, I started out using the built-in jukebox on Roll20 for ambient and audio tracks but I wanted to have more control over my audio selection (especially since Roll20 has removed support for audio platforms such as SoundCloud in the past). After experimenting with different solutions, such as Discord bots, I came up with a “hacky” solution that gives me all the control I want.

Requirements

» Hosting Images on Dropbox

January 29, 2019 - 3 minute read

Introduction

When I started this blog several months ago, I was still deciding on how best to host images. My first thought was to use GitHub itself, since that is where this website is hosted. But that wouldn’t be a long-term solution considering that GitHub strongly recommends keeping repositories under 1GB and has restrictions.

Then I considered using Google Photos, but I have been trying to cut back on the amount of Google services I use because I don’t trust Google to keep services running long term.

OneDrive would have been my pick if it wasn’t for the fact that Microsoft STILL has not released a native OneDrive client for Linux.

That left me with Dropbox. A company whose primary offering is cloud file storage. Dropbox has a lot going for it: free 2GB of storage with the ability to get up to 16 GB of free space by inviting your friends, great permissions/sharing control, and even a native client for Linux!

» Full-screen iframe with a Height of 100%

December 19, 2018 - 2 minute read

Introduction

Sometimes, I write small PHP web applications that are used on an internal web portal. The problem with the web portal is that it does not support inline PHP, but it does support inline JS and HTML. Using a bit of JS and a HTML iframe I display these web applications and make them appear to be a part of the web portal itself!

Note: This will only work on if the URL in the iframe matches the same domain as the host page it is embedded on.

Getting 100% iframe Height

The big part of having the iframe integrate seamlessly into the portal is to have the height of it match the height PHP web application, that way I don’t need to scroll inside the iframe to view everything.

To calculate the height the iframe should be, I use a bit of JS with a function called calcHeight. This function will calculate the height in pixels the iframe needs to be.

JS

function calcHeight(iframeElement) {
  var the_height = iframeElement.contentWindow.document.body.scrollHeight;
  iframeElement.height = the_height;
}

In order to call the function calcHeight, I need to add an inline event. This event will occur every time something is loaded in the iframe and looks like this: onLoad="calcHeight(this);" inside the iframe.

I also remove the ability to scroll, since the iframe will be full height anyways using scrolling="no".

HTML

<iframe src="https://YOURDOMAIN" onLoad="calcHeight(this); 
frameborder="0" scrolling="no" id="the_iframe" width="100%">
  <p>Your browser does not support iframes.</p>
</iframe>

Note: Replace https://YOURDOMAIN with the URL you want to be iframed.

» Fully Removing Applications on macOS

December 11, 2018 - 5 minute read

Introduction

While macOS handles the removal of applications better than the mess of %APPDATA% files and registry keys found on Windows. If you are like me and want to remove ALL traces of an application from your computer, finding where an application creates folders and files on your system is pretty useful.

Applications Folder

The first step in removing and an application from macOS is to open the Finder and click on Applications on the left-hand sidebar.

Right click on the application you want to uninstall and click Move to Trash.

With the simple part out of the way, let’s go file hunting!

The Two Library folders

There are two locations on your disk drive, both named Library, where applications store their preferences and supporting files. The first is located at the top level of your disk drive / and the second is inside your Home Folder ~. Removing files from both these locations is necessary to completely uninstall applications.

» Using a Windows Steam Directory with Steam Proton

November 05, 2018 - 1 minute read

This Post Is Outdated and Should Redirect to the Updated Version

Click here if you were not redirected

Introduction

If you are like me and have a large Steam library and are still switching from Windows to Linux, you can actually use your Windows installed games on Linux thanks to the Valve developed Proton!

Requirements

  • The Linux version of Steam installed (I am using Ubuntu 18.10)
  • A separate NTFS formatted disk with your Steam library folder (this guide assumes that Windows is NOT installed on this disk)
  • Up to date graphics drivers:
    • NVIDIA
        sudo add-apt-repository ppa:graphics-drivers/ppa
        sudo apt install nvidia-driver-396
      
    • AMD/Intel
        sudo add-apt-repository ppa:paulo-miguel-dias/pkppa
        sudo apt dist-upgrade
        sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386
      
  • Python 3 and Python Minimal:
    • Python 3
        sudo apt install python3
      
    • Python Minimal
        sudo apt install python-minimal