<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Keith's Musings]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>http://blog.keitharm.me/</link><generator>Ghost 0.7</generator><lastBuildDate>Sun, 23 Apr 2023 23:57:34 GMT</lastBuildDate><atom:link href="http://blog.keitharm.me/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Windows 11 keeps resetting my Blue Yeti Microphone input volume to 50% when I boot]]></title><description><![CDATA[<p>The point of this blog was to share solutions to obscure problems on the internet in case it happens to help someone experiencing the same thing. So after a 5 year hiatus, here's a short one</p>

<p>Make sure the Speakers playback device for your Blue Yeti is disabled. This is</p>]]></description><link>http://blog.keitharm.me/windows-11-keeps-res/</link><guid isPermaLink="false">d130b480-c71a-4e3e-b109-27a9acd163c4</guid><dc:creator><![CDATA[Keith Armstrong]]></dc:creator><pubDate>Mon, 05 Sep 2022 18:08:59 GMT</pubDate><content:encoded><![CDATA[<p>The point of this blog was to share solutions to obscure problems on the internet in case it happens to help someone experiencing the same thing. So after a 5 year hiatus, here's a short one</p>

<p>Make sure the Speakers playback device for your Blue Yeti is disabled. This is the playback option for playing through a device you plug into the mic's 3.5mm jack. In my use case, I have the HyperX Cloud Alpha headphones and don't require this jack. I had recently enabled the device which looks like it was resetting my mic volume to 50%...no idea why this fixed it but it did for me at least.</p>

<p><img src="http://blog.keitharm.me/content/images/2022/09/Screenshot-2022-09-05-130618.png" style="width: 300px;"></p>

<hr>]]></content:encoded></item><item><title><![CDATA[Verifying dialog box on macOS High Sierra 10.13]]></title><description><![CDATA[<p>If you upgraded to macOS High Sierra 10.13, you might have noticed a new annoying dialog that'll pop up before you can open certain files. It looks a little something like this: <br>
<img src="http://blog.keitharm.me/content/images/2017/10/Screen-Shot-2017-10-15-at-12-55-08-PM.png" style="width: 500px;"></p>

<p>At first, I thought the update had automatically enabled FileVault 2 on my SSD (since the icon</p>]]></description><link>http://blog.keitharm.me/verifying-dialog-box-on-macos-high-sierra-10-13/</link><guid isPermaLink="false">58126b1e-f60c-40ad-835e-597f9fc77744</guid><category><![CDATA[macOS]]></category><category><![CDATA[verifying]]></category><category><![CDATA[high sierra]]></category><category><![CDATA[bug]]></category><category><![CDATA[fix]]></category><dc:creator><![CDATA[Keith Armstrong]]></dc:creator><pubDate>Sun, 15 Oct 2017 18:07:52 GMT</pubDate><content:encoded><![CDATA[<p>If you upgraded to macOS High Sierra 10.13, you might have noticed a new annoying dialog that'll pop up before you can open certain files. It looks a little something like this: <br>
<img src="http://blog.keitharm.me/content/images/2017/10/Screen-Shot-2017-10-15-at-12-55-08-PM.png" style="width: 500px;"></p>

<p>At first, I thought the update had automatically enabled FileVault 2 on my SSD (since the icon and "verifying" text looks similar). But as it turns out in my case at least, if I open any video files in Quicktime, it'll add the "com.apple.quarantine" extended attribute to the file. It looks like this is a bug and hopefully Apple will fix it soon since it makes opening large files on slower devices take <strong>minutes</strong> to verify with no skip button like you have for .dmg files.</p>

<p>In the meantime, you can remove the quarantine attribute from your file using the <code>xattr</code> command in terminal.</p>

<blockquote>
  <p>Also, I'll just leave this here if you understand the risks. If you want to disable quarantine system-wide so that you don't have to do the following steps on a per-file basis, type this command into terminal and restart your computer. Keep in mind though that this is disabling a protection feature of macOS and isn't recommended, although it should fix your problem permanently and system-wide. </p>
  
  <p><code>defaults write com.apple.LaunchServices LSQuarantine -bool NO</code></p>
</blockquote>

<ol>
<li>Open Terminal by typing <code>terminal</code> into spotlight search.  </li>
<li>Type <code>xattr</code> and then drag the file (or type the path) in question into terminal like so: <br>
<img src="http://blog.keitharm.me/content/images/2017/10/Screen-Shot-2017-10-15-at-1-02-06-PM.png" style="width: 500px;">  </li>
<li>Hit enter and you'll see the current attributes on said file. <br>
<img src="http://blog.keitharm.me/content/images/2017/10/Screen-Shot-2017-10-15-at-1-04-51-PM.png" style="width: 500px;">  </li>
<li>If you see <code>com.apple.quarantine</code>, you can remove it by adding <code>-d com.apple.quarantine</code> between the command and file name like this: <br>
<img src="http://blog.keitharm.me/content/images/2017/10/Screen-Shot-2017-10-15-at-1-05-18-PM.png" style="width: 500px;">  </li>
<li>Now when you rerun <code>xattr</code> to see the current attributes on the file, <code>com.apple.quarantine</code> shouldn't be there anymore and you should be able to open your files without the long verifying times. <br>
<img src="http://blog.keitharm.me/content/images/2017/10/Screen-Shot-2017-10-15-at-1-06-20-PM.png" style="width: 500px;"></li>
</ol>]]></content:encoded></item><item><title><![CDATA[How to set up nginx on Ubuntu 15.10]]></title><description><![CDATA[<p><img src="http://blog.keitharm.me/content/images/2016/03/nginx-1.png" alt="Nginx logo" style="width: 200px;"></p>

<h4 id="aboutnginx">About nginx</h4>

<blockquote>
  <p>NGINX is a very fast Webserver, its faster than Apache (under similar conditions) because it doesn't need to spawn new processes or threads for each request like Apache does. Hence it also has a low memory foot print. - <a href="https://www.digitalocean.com/community/questions/what-is-nginx-and-why-might-i-want-to-use-it-over-apache?answer=3707">sridharpandu</a></p>
</blockquote>

<h4 id="gettingstarted">Getting Started</h4>

<p>For this guide, we will be</p>]]></description><link>http://blog.keitharm.me/how-to-set-up-nginx-on-ubuntu-15-10/</link><guid isPermaLink="false">91131d68-c6d9-415c-bc5c-c314917d26ce</guid><category><![CDATA[nginx]]></category><category><![CDATA[digital ocean]]></category><category><![CDATA[tutorial]]></category><dc:creator><![CDATA[Keith Armstrong]]></dc:creator><pubDate>Tue, 01 Mar 2016 21:15:58 GMT</pubDate><content:encoded><![CDATA[<p><img src="http://blog.keitharm.me/content/images/2016/03/nginx-1.png" alt="Nginx logo" style="width: 200px;"></p>

<h4 id="aboutnginx">About nginx</h4>

<blockquote>
  <p>NGINX is a very fast Webserver, its faster than Apache (under similar conditions) because it doesn't need to spawn new processes or threads for each request like Apache does. Hence it also has a low memory foot print. - <a href="https://www.digitalocean.com/community/questions/what-is-nginx-and-why-might-i-want-to-use-it-over-apache?answer=3707">sridharpandu</a></p>
</blockquote>

<h4 id="gettingstarted">Getting Started</h4>

<p>For this guide, we will be installing nginx on a Digital Ocean droplet running Ubuntu 15.10. If you need help setting up your own droplet, check out my other blog post, <a href="http://blog.keitharm.me/setting-up-a-digital-ocean-droplet/">How to set up a Digital Ocean Droplet</a>.</p>

<h4 id="installnginx">Install nginx</h4>

<p>Run <code>sudo apt-get install nginx</code> and you're done...just kidding!</p>

<p>Well, technically nginx is now installed and you can access it at your IP address, but we want to easily access our files and change some permissions around before we call it a day.</p>

<h4 id="webrootlocation">Web root location</h4>

<p>By default, nginx will create a directory at <code>/var/www/html</code> that will house all of your static files that you want to serve.</p>

<p>While your website will work just fine at this location, it isn't really the <a href="http://serverfault.com/questions/102569/should-websites-live-in-var-or-usr-according-to-recommended-usage/102592#102592">proper</a> spot to place files for nginx to serve. Also, if you end up hosting multiple domains in the future, it'll just become a bigger mess. What we are going to do instead is place our files in the <code>/srv</code> directory, </p>

<h4 id="settingupsrv">Setting up /srv</h4>

<p>We are going to have to set up a directory structure in the <code>/</code> folder which will require a lot of <code>sudo</code>.</p>

<p>To save some typing, you can login to the root account by typing <code>sudo su</code> followed by your password. Now you won't have to prepend every command with <code>sudo</code> for the next few steps.</p>

<p>Go to the <code>/srv</code> folder with <code>cd /srv</code>.</p>

<p>Now make a directory called <code>www</code> by running <code>mkdir www</code> and then go to the new directory with <code>cd www</code>.</p>

<p>This will be the directory that all of your domains will be housed. Make a new folder with your domain. For example: <code>mkdir keitharm.me</code>. If you don't have a domain and just want to host from your ip, you can make a default folder instead <code>mkdir default</code>. Now, enter the directory and make a directory called <code>public_html</code>. This will be the directory that all of your files you want to served from. Next, enter public_html and type <code>echo "hello world" &gt; index.html</code> to make a test index.html file that we can use for later.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/03/Screen-Shot-2016-03-01-at-6-09-11-PM.png" alt="Setting up /srv" style="width: 600px;"></p>

<h4 id="permissions">Permissions</h4>

<p>Currently, any of the files under the <code>/srv</code> directory will require root permissions in order to modify/create/delete. We will need to change the permissions of the domain folder you made so that you (and possibly others) will have access to the files.</p>

<p>If you only want 1 user to have read/write permissions for a domain's directory, you can easily just run <code>chown keith:keith -R /srv/www/keitharm.me</code>. This will make it so that only keith (and root) can create/modify/delete files in the keitharm.me directory as well as any directories underneath it (<code>public_html</code>). You can skip to the next step, "Making an easy access alias".</p>

<p><img src="http://blog.keitharm.me/content/images/2016/03/Screen-Shot-2016-03-01-at-6-10-10-PM.png" alt="Setting up permissions for a single user" style="width: 600px;"></p>

<p>If you want multiple users to be able to read/write a domain's directory, we will have to setup a new group that has access to the folder. To do this, we will make a new group called <code>keitharm</code>, give the keitharm group read/write permissions for the <code>keitharm.me</code> directory, and then add users <code>keith</code> and <code>garrett</code> to the group so that both users have access. To make a new group, type <code>addgroup keitharm</code>.</p>

<p>Now, we need to change the group owner of <code>/srv/www/keitharm.me</code> to <code>keitharm.me</code>. You can do this by typing <code>chgrp keitharm /srv/www/keitharm.me</code>. Next, we need to set the read/write permissions for the group. Type <code>chmod g+rws -R /srv/www/keitharm.me</code>.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/03/Screen-Shot-2016-03-01-at-6-13-05-PM.png" alt="changing group" style="width: 600px;"></p>

<p>If you are wondering what the <code>s</code> means in that command, you can read up more about setuid/gid <a href="https://en.wikipedia.org/wiki/Chmod#Special_modes">here</a>. Basically, it means that if a user with read/write permissions to a directory creates a file, it'll duplicate the current read/write and group permissions for that file. This is so that if <code>keith</code> creates a file, it'll make the group owner for that file <code>keitharm</code> and also make it maintain it's read/write permissions so that later on, <code>garrett</code> could modify that file as well. This applies to directories as well.</p>

<p>Now for the last step, we have to add <code>keith</code> and <code>garrett</code> to the <code>keitharm</code> group. You can do this with the <code>usermod</code> command like so:</p>

<p><code>usermod -a -G keitharm keith</code> - Add <code>keith</code> to the <code>keitharm</code> group.</p>

<p><code>usermod -a -G keitharm garrett</code> - Add <code>garrett</code> to the <code>keitharm</code> group.</p>

<p>Now both of those users will have full read/write permissions for the domain's directory (if the user is currently logged in, they'll need to logout and back in again for the permissions to update for their account).</p>

<p><img src="http://blog.keitharm.me/content/images/2016/03/Screen-Shot-2016-03-01-at-6-13-29-PM.png" alt="adding users to groups" style="width: 600px;"></p>

<h4 id="makinganeasyaccessalias">Making an easy access alias</h4>

<p>For the last step, it'd be nice if you didn't have to type the full path <code>/srv/www/keitharm.me/public_html/</code> everytime you wanted to access something on your website. Luckily, we can use symbolic links to make a shortcut in your home directory so that you can access your files through something like <code>www</code> instead.</p>

<p>Make sure you are in the user's home folder (or wherever you want the shortcut to be) and type <code>ln -s /srv/www/keitharm.me/public_html www</code>. This will make a new symbolic link in the directory that you can <code>cd</code> into to easily get to the real directory.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/03/Screen-Shot-2016-03-01-at-6-15-11-PM.png" alt="Symoblic link" style="width: 600px;"></p>

<h4 id="changingnginxsdefaultdirectory">Changing nginx's default directory</h4>

<p>Now that we have all of our permissions and directories set up, we need to update the nginx config to point to the new paths.</p>

<p>nginx's config is located at <code>/etc/nginx</code>. What we are interested in is the <code>sites-available</code> folder. By default, there is a <code>default</code> file in there with nginx configuration information. If you only want to host from your ip, you can keep this file. Otherwise, if you have a domain, make a newfile with your domain name like <code>keitharm.me</code>.</p>

<p>Now, copy the <code>default</code> config file into your new domain file with <code>cp default keitharm.me</code>. And then, edit the file with <code>nano keitharm.me</code>.</p>

<p>You will see a lot of configurations settings that you can learn more about <a href="https://www.linode.com/docs/websites/nginx/how-to-configure-nginx">here</a>, but the one setting that we are concerned about is the <code>root</code> value. Located on line 36, this is the directory that nginx will server files out of.</p>

<p>Change this to <code>/srv/www/keitharm.me/public_html</code> and then save and close the file.</p>

<p>Now go to <code>/etc/nginx/sites-enabled</code>. This is the actual directory that nginx loads the settings from. You can think of the <code>sites-available</code> directory as the staging area. In order to "enable" the site, we make a symbolic link to the config file in the <code>sites-available</code> directory like so: <br>
<code>ln -s /etc/nginx/sites-available/keitharm.me</code></p>

<p>Make sure you remove the <code>default</code> file with <code>rm default</code> if you are using your own domain file.</p>

<p>Now, test your nginx configuration with <code>nginx -t</code>. If no errors appear, you can restart the nginx server with <code>service nginx restart</code>.</p>

<p>Go to your ip address and you should see our "hello world" message from the index.html file that we created from before!</p>]]></content:encoded></item><item><title><![CDATA[How to set up a Digital Ocean Droplet]]></title><description><![CDATA[Learn how to easily setup a Digital Ocean Server.]]></description><link>http://blog.keitharm.me/setting-up-a-digital-ocean-droplet/</link><guid isPermaLink="false">4490a79b-7a23-444d-8cb0-2d6834303265</guid><category><![CDATA[tutorial]]></category><category><![CDATA[server]]></category><category><![CDATA[cloud]]></category><category><![CDATA[hosting]]></category><category><![CDATA[digital ocean]]></category><dc:creator><![CDATA[Keith Armstrong]]></dc:creator><pubDate>Fri, 26 Feb 2016 21:55:10 GMT</pubDate><content:encoded><![CDATA[<p><img src="https://www.digitalocean.com/assets/media/logos-badges/png/DO_Logo_Horizontal_Blue-3db19536.png" alt="Digital Ocean logo" style="width: 400px;"></p>

<p><a href="https://www.youtube.com/watch?v=KQtu7XXxOJ4">Blog post video tutorial available on youtube</a></p>

<h4 id="aboutdigitalocean">About Digital Ocean</h4>

<p><a href="https://m.do.co/c/54377ab20a71">Digital Ocean</a> is a simple cloud hosting service built for developers.</p>

<p>Unlike other services that have tools like cPanel and Jailshells, Digital Ocean provides you with full root access which gives you complete control over your server. This freedom also requires you to know what you are doing in order to get everything in working order. </p>

<h4 id="gettingstarted">Getting Started</h4>

<p>To get started, go to <a href="https://m.do.co/c/54377ab20a71">Digital Ocean</a> and sign up. Make sure you use my link in order to get a free $10 in credit (2 months of server time) added to your account.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/02/signup.PNG" alt="Signing Up" style="width: 600px;"></p>

<p>Once you have signed up, have verified your email, and have added a form of payment, you are ready to set up your first droplet (droplet = server in DO jargon).</p>

<h4 id="creatingadroplet">Creating a droplet</h4>

<p>Click on Create Droplet, and make the most important decision: which OS you want this server to run.</p>

<p>It's mostly a matter of personal preference which OS to choose...so personally, I'd stick with Ubuntu 15.10 x64. I'm not going to waste half a page giving reasons for choosing it over another version, 32/64 bit, OS, LTS or not, etc., I'm sure you can find thousands of arguments on Google for that. But the main reasons are: the large community you can talk to for support, large library of packages supported through apt-get, and there are a huge number of tutorials out there that use Ubuntu as their OS of choice which makes following along MUCH easier (exhibit A).</p>

<p><img src="http://blog.keitharm.me/content/images/2016/02/os.PNG" alt="Choose an image" style="width: 600px;"></p>

<p>Next, pick a droplet size. Keep in mind that you can <a href="https://www.digitalocean.com/community/tutorials/how-to-resize-your-droplets-on-digitalocean">resize your droplet</a> in the future if your server demands it, but only upwards. Unless you choose flexible resizing, you will not be able to go back to a lower and cheaper tier. So, I'd play it safe by starting off at $5.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/02/size-1.PNG" alt="Choose a size" style="width: 600px;"></p>

<p>And finally, choose which region you'd like your server hosted. It'd probably be the best to choose a region closest to you/your audience in order to lower latency...although it probably won't be very noticeable unless your website is very high demand. Check this <a href="https://www.digitalocean.com/community/questions/question-about-droplet-region">article</a> out to learn more.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/02/region-1.PNG" alt="Choose a datacenter region" style="width: 600px;"></p>

<p>For additional options, I'd just choose Private Networking in case I end up spinning up another droplet that I'd like to easily communicate with using an internal IP. </p>

<p><img src="http://blog.keitharm.me/content/images/2016/02/options.PNG" alt="Select additional options" style="width: 600px;"></p>

<p>Now we wait ~55 seconds for your droplet to be created. You should receive an email shortly after creating your droplet that will contain your IP address, and root password.</p>

<p><img src="http://blog.keitharm.me/content/images/2016/02/wait.PNG" alt="Waiting" style="width: 600px;"> <br>
55 seconds later... <br>
<img src="http://blog.keitharm.me/content/images/2016/02/ip.PNG" alt="Select additional options" style="width: 600px;"></p>

<h4 id="configuringyourdroplet">Configuring your droplet</h4>

<p>Open up your favorite Terminal client and ssh to your new server! For Windows users, you can download a terminal client such as <a href="https://www.cygwin.com/">Cygwin</a> or <a href="http://www.putty.org/">PuTTY</a> or follow along from your droplet's console on DO by clicking on your droplet and then clicking console access.</p>

<p><code>$ ssh root@your_ip_address</code></p>

<p>Once you have logged in, you will have to change your root password for security measures.  </p>

<pre><code>$ ssh root@12.34.56.78
The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.  
ECDSA key fingerprint is SHA256:zqAUPWpCLXCCUCLKaj+jNAxgKw1FRRh+lVvFH3q0f2k.  
Are you sure you want to continue connecting (yes/no)? yes  
Warning: Permanently added '12.34.56.78' (ECDSA) to the list of known hosts.  
root@12.34.56.78's password:  
You are required to change your password immediately (root enforced)  
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-27-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
Changing password for root.  
(current) UNIX password:
Enter new UNIX password:  
Retype new UNIX password:  
root@ubuntu-512mb-sfo1-01:~#  
</code></pre>

<p>Now with that out of the way, we are going to update all of the packages on your new droplet to their latest versions using <code>apt-get</code>.</p>

<p>Run <code>apt-get update</code> followed by <code>apt-get upgrade -y</code> to update all of the packages currently installed on your droplet. <br>
<code># apt-get update &amp;&amp; apt-get upgrade -y</code></p>

<p>Next, we are going to update the kernel using <code>apt-get dist-upgrade -y</code>. <br>
<code># apt-get dist-upgrade -y</code></p>

<p>And finally, we are going to remove the old kernel with <code>apt-get autoremove -y</code> and then reboot the droplet to load in the latest kernel by typing <code>reboot</code>. <br>
<code># apt-get autoremove -y &amp;&amp; reboot</code></p>

<p>Now it's time to secure your account. First, we are going to set up a personal account for yourself, give it sudo privileges, and then lastly disable root login.</p>

<p>Type <code>adduser username_here</code> to add a new user. Give the user a password and then leave the rest of the values blank by pressing enter.</p>

<p>Now, type <code>visudo</code> and look for the line <code># User privilege specification</code>. <br>
Follow the format of root and type a new line with your username. It should look something like this:  </p>

<pre><code># User privilege specification
root    ALL=(ALL:ALL) ALL  
username_here (ALL:ALL) ALL  
</code></pre>

<p>Save the file with <code>ctrl + x</code>, <code>y</code>, <code>enter</code></p>

<p>Now, we will disable root login for security.</p>

<p>Type <code>nano /etc/ssh/sshd_config</code> <br>
Find the line that says <code>PermitRootLogin yes</code> and change the yes to no. <br>
Save the same way as before with <code>ctrl + x</code>, <code>y</code>, <code>enter</code>. <br>
And type <code>service sshd restart</code> to make the changes take effect. You should be unable to login as root now...use your new account you just created from now on. If you need to run something as root, you should prepend the <code>sudo</code> keyword to your command.</p>

<p>Congratulations! You have finished setting up your Digital Ocean droplet!</p>

<p>In a future blog post, we will go over setting up an NGINX web server as well as setting up a node server that uses the reverse proxy feature of NGINX.</p>]]></content:encoded></item><item><title><![CDATA[Welcome]]></title><description><![CDATA[<p>Welcome to my blog... <br>
It is quite bare right now, but hopefully 3 years from now it'll be super popular and everyone will love it.</p>

<p>From now...</p>]]></description><link>http://blog.keitharm.me/welcome/</link><guid isPermaLink="false">283584a9-4559-4c06-aced-2e056e78c771</guid><dc:creator><![CDATA[Keith Armstrong]]></dc:creator><pubDate>Fri, 26 Feb 2016 21:13:27 GMT</pubDate><content:encoded><![CDATA[<p>Welcome to my blog... <br>
It is quite bare right now, but hopefully 3 years from now it'll be super popular and everyone will love it.</p>

<p>From now...</p>]]></content:encoded></item></channel></rss>