<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://bauerjj.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://bauerjj.com/" rel="alternate" type="text/html" /><updated>2021-03-29T22:57:40-07:00</updated><id>https://bauerjj.com/feed.xml</id><title type="html">bauerjj</title><subtitle>Thoughts on my mind - blog - website - random</subtitle><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><entry><title type="html">Ackee Analytics with MongoDB Atlas using Netlify</title><link href="https://bauerjj.com/blog/ackee-analytics-with-mongodb/" rel="alternate" type="text/html" title="Ackee Analytics with MongoDB Atlas using Netlify" /><published>2021-03-26T00:00:00-07:00</published><updated>2021-03-26T00:00:00-07:00</updated><id>https://bauerjj.com/blog/ackee-analytics-with-mongodb</id><content type="html" xml:base="https://bauerjj.com/blog/ackee-analytics-with-mongodb/">&lt;p&gt;I transitioned from the spyware of Google Analytics to a more privacy focused analytics solution. I also didn’t require the granularity that Google Analytics provided. My other requirement was that I’m lazy and didn’t want to self-host. Thus I opted to use &lt;a href=&quot;https://github.com/electerious/Ackee&quot;&gt;Ackee&lt;/a&gt; and &lt;a href=&quot;https://www.netlify.com/&quot;&gt;Netlify&lt;/a&gt; in conjunction with &lt;a href=&quot;https://www.mongodb.com/cloud/atlas&quot;&gt;MongoDB Atlas&lt;/a&gt;. It took me about 20 minutes to create the necessary accounts and install the small snippet of code to start seeing the analytics.&lt;/p&gt;

&lt;h2 id=&quot;mongodb-atlas&quot;&gt;MongoDB Atlas&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Create an account at &lt;a href=&quot;https://www.mongodb.com/cloud/atlas&quot;&gt;MongoDB Atlas&lt;/a&gt; and opt for a free account. Create a new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Project&lt;/code&gt; and then click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create a New Cluster&lt;/code&gt; button and wait for it to finish.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Security&lt;/code&gt; column, select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Database Access&lt;/code&gt; and create a new user database user by clicking &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ADD NEW DATABASE USER&lt;/code&gt; and choose to authenticate using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;password&lt;/code&gt; method. Make the username &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ackee&lt;/code&gt; and create your own strong password.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Network Access&lt;/code&gt; and then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ADD IP ADDRESS&lt;/code&gt; and enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.0.0.0/0&lt;/code&gt; to make it universal since Netlify will be making the requests and not your local machine.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;When the cluster is finished creating, select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Connect&lt;/code&gt; and then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Connect your application&lt;/code&gt; and note a similar connection string of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mongodb+srv://ackee:&amp;lt;password&amp;gt;@cluster0.&amp;lt;your-server-uri&amp;gt;.mongodb.net/myFirstDatabase&lt;/code&gt;. That is all for now&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;netlify&quot;&gt;Netlify&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Click the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Deploy to Netlify&lt;/code&gt; button found on Ackee’s &lt;a href=&quot;https://docs.ackee.electerious.com/#/docs/Get%20started#with-netlify&quot;&gt;Getting Started&lt;/a&gt; page. Then authenticate using your existing github credentials.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Netlify will prompt you for a few credentials. Enter the following:&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;ACKEE_USERNAME = &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ackee&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;ACKEE_PASSWORD = &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;your-strong-password&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;ACKEE_MONGODB  = &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;your-mongodb-database-password-from-atlas&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;ACKEE_ALLOW_ORIGIN = &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The astrix can be replaced with your netfliy URL. Mine looks something like this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dazzling-engelbart-xxxxx.netlify.app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; You can change these environment variables after you create the website inside netlify under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Deploy-&amp;gt;Environment&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Allow Netlify to now create your repository on github and build and publish it automatically! Login to your Ackee web interface, in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Settings&lt;/code&gt; panel, set up a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;New domain&lt;/code&gt; in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Domains&lt;/code&gt; section. You should also see the the tracking code (embed code) with a unique &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;domain-id&lt;/code&gt;. Copy and paste this code in the header section of your website in order to capture all vists. In Laravel, there is a unique &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;head.blade&lt;/code&gt; template for stuffing this into.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/ackee.png&quot; alt=&quot;ackee dashboard howto&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;See &lt;a href=&quot;https://frankindev.com/2020/12/20/selfhost-ackee-for-traffic-analytics/&quot;&gt;this blog post&lt;/a&gt; on how to keep up-to-date with Ackee.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;You can now export all of your existing Google Analytics information into excel and delete the tracking code.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">I transitioned from the spyware of Google Analytics to a more privacy focused analytics solution. I also didn’t require the granularity that Google Analytics provided. My other requirement was that I’m lazy and didn’t want to self-host. Thus I opted to use Ackee and Netlify in conjunction with MongoDB Atlas. It took me about 20 minutes to create the necessary accounts and install the small snippet of code to start seeing the analytics.</summary></entry><entry><title type="html">Git History Graphs</title><link href="https://bauerjj.com/blog/git-history-graphs/" rel="alternate" type="text/html" title="Git History Graphs" /><published>2019-06-14T00:00:00-07:00</published><updated>2019-06-14T00:00:00-07:00</updated><id>https://bauerjj.com/blog/git-history-graphs</id><content type="html" xml:base="https://bauerjj.com/blog/git-history-graphs/">&lt;p&gt;This is more of a reminder for myself so that I can remember how to edit my banner image.&lt;/p&gt;

&lt;p&gt;I was looking for a way to generate pretty git graphs for my webpage to showcase my professional progression when I stumpled upon this &lt;a href=&quot;https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs&quot;&gt;stackoverflow post&lt;/a&gt;. From there I followed one of the answers to &lt;a href=&quot;https://github.com/ianmiell/gitdags&quot;&gt;gitdags&lt;/a&gt; repo. I would encourage new users to use the supplied docker image to save yourself from installing numerous software packages like I did.&lt;/p&gt;

&lt;p&gt;Here is the source of my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tex&lt;/code&gt; file to generate my banner image:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;\documentclass[preview]{standalone}
%\documentclass{article}
\usepackage[a4paper, landscape, total={20in, 20in}, margin=0pt]{geometry}



\usepackage{subcaption}
\usepackage{gitdags}

\begin{document}

\begin{figure}
  \begin{subfigure}[b]{\textwidth}
    \centering
    \begin{tikzpicture}
      % Commit DAG
      \gitDAG[grow right sep = 2.5em, branch down=4em]{
          1989[xshift=-4em] -- 2011 -- feb --     
          {  microchip{-}technology[yshift=2em, xshift=0em] -- 2014[yshift=2em] -- blockwise{-}engineering[yshift=2em] -- 2017[yshift=2em] --  agjunction[yshift=2em] -- 2019[yshift=2em] -- axon[yshift=2em] ,  
            sphinx{-}search[xshift=0em, yshift=0em] -- http{://}mcuhq{.}com -- http{://}bauerjj{.}github{.}io[yshift=0em] }
           -- justin{-}bauer
      };
      % Tag reference
      \gittag
        [v0p1]       % node name
        {electrical\char`_engineering}       % node text
        {above=of 2011} % node placement
        {2011}  
      \gittag
        [v0p2]       % node name
        {rose-hulman\char`_inst\char`_of\char`_tech}       % node text
        {above=of v0p1} % node placement
        {v0p1}          % target        % target
      \gittag
        [appEngineer]       % node name
        {applications\char`_engineer}       % node text
        {above=of microchip{-}technology} % node placement
        {microchip{-}technology}
      \gittag
        [bwisejob]       % node name
        {embedded\char`_electrical\char`_engineer}       % node text
        {above=of blockwise{-}engineering} % node placement
        {blockwise{-}engineering} 
      \gittag
        [agjunctionjob]       % node name
        {embedded\char`_software\char`_engineer}       % node text
        {above=of agjunction} % node placement
        {agjunction} 
      \gittag
        [axonjob]       % node name
        {senior\char`_software\char`_engineer}       % node text
        {above=of axon} % node placement
        {axon} 
      % Remote branch
      \gitremotebranch
        [origmaster]    % node name
        {origin/master} % node text
        {above=of 1989}    % node placement
        {1989}             % target
      % Branch
      \gitbranch
        {chicago{-}il}     % node name and text 
        {below=of 1989} % node placement
        {1989}          % target
      \gitbranch
        {indy-in}     % node name and text 
        {below=of 2011} % node placement
        {2011}          % target
      \gitbranch
        {tempe{-}az}     % node name and text 
        {below=of feb} % node placement
        {feb}          % target
      \gitHEAD
        {above=of justin{-}bauer} % node placement
        {justin{-}bauer}          % target
      \gitbranch
        {dev{-}hobby}     % node name and text 
        {below=of sphinx{-}search} % node placement
        {sphinx{-}search}          % target
      \gitbranch
        {dev{-}hobby}     % node name and text 
        {below=of http{://}mcuhq{.}com} % node placement
        {http{://}mcuhq{.}com}          % target
      \gitbranch
        {dev{-}hobby}     % node name and text 
        {below=of http{://}bauerjj{.}github{.}io} % node placement
        {http{://}bauerjj{.}github{.}io}          % target
    \end{tikzpicture}
  \end{subfigure}


 
\end{figure}

\end{document}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">This is more of a reminder for myself so that I can remember how to edit my banner image.</summary></entry><entry><title type="html">Fix tearing for NVIDIA in Ubuntu 18.04 Mate</title><link href="https://bauerjj.com/blog/tearing-in-ubuntu18/" rel="alternate" type="text/html" title="Fix tearing for NVIDIA in Ubuntu 18.04 Mate" /><published>2018-10-22T00:00:00-07:00</published><updated>2018-10-22T00:00:00-07:00</updated><id>https://bauerjj.com/blog/tearing-in-ubuntu18</id><content type="html" xml:base="https://bauerjj.com/blog/tearing-in-ubuntu18/">&lt;p&gt;I noticed terrible tearing inside firefox after upgrading to 18.04 and getting new 2k monitors finally. I had a guess that it was related to vsync not being enabled, however the NVIDIA X Server Settings indicated that “Sync to VBlank” was already enabled and I took that to mean that vsync was enabled. I still had the problem until I &lt;a href=&quot;https://ubuntu-mate.community/t/fix-firefox-smooth-scrolling-tearing-youtube-video-tearing/17182/10&quot;&gt;tried this solution&lt;/a&gt; which was to enable vsync inside the proprietary driver. I changed my driver for my Quadro K2100M integrated graphics to using the “NVIDIA driver metapackage from nvidia-driver-390 (proprietary, tested)” inside of “Software and Updates”. In summary, do the following:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo echo &quot;options nvidia-drm modeset=1&quot; &amp;gt;&amp;gt; /etc/modprobe.d/nvidia-drm-nomodeset.conf
$ sudo update-initramfs -u
$ sudo reboot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Check with:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo cat /sys/module/nvidia_drm/parameters/modeset&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now you can scroll vertically with no noticeable tearing.&lt;/p&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">I noticed terrible tearing inside firefox after upgrading to 18.04 and getting new 2k monitors finally. I had a guess that it was related to vsync not being enabled, however the NVIDIA X Server Settings indicated that “Sync to VBlank” was already enabled and I took that to mean that vsync was enabled. I still had the problem until I tried this solution which was to enable vsync inside the proprietary driver. I changed my driver for my Quadro K2100M integrated graphics to using the “NVIDIA driver metapackage from nvidia-driver-390 (proprietary, tested)” inside of “Software and Updates”. In summary, do the following:</summary></entry><entry><title type="html">Setup Leger Nano S on Ubuntu Linux</title><link href="https://bauerjj.com/blog/setup-ledger-nano-s-linux/" rel="alternate" type="text/html" title="Setup Leger Nano S on Ubuntu Linux" /><published>2018-03-20T00:00:00-07:00</published><updated>2018-03-20T00:00:00-07:00</updated><id>https://bauerjj.com/blog/setup-ledger-nano-s-linux</id><content type="html" xml:base="https://bauerjj.com/blog/setup-ledger-nano-s-linux/">&lt;p&gt;This is a quick HOW-TO for getting your new Ledger Nano S running in Ubuntu&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Choose a PIN on your Nano S&lt;/li&gt;
  &lt;li&gt;Record the 24-word seed on the supplied papers&lt;/li&gt;
  &lt;li&gt;Create a new udev rule so that ubuntu will recognize the USB device.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; sudo subl /etc/udev/rules.d/ledger.rules
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Paste the following into the udev rules file. Be sure to replace your username:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; SUBSYSTEMS==&quot;usb&quot;, ATTRS{idVendor}==&quot;2c97&quot;, ATTRS{idProduct}==&quot;0000&quot;, MODE=&quot;0660&quot;, TAG+=&quot;uaccess&quot;, TAG+=&quot;udev-acl&quot; OWNER=&quot;&amp;lt;UNIX username&amp;gt;&quot;
 SUBSYSTEMS==&quot;usb&quot;, ATTRS{idVendor}==&quot;2c97&quot;, ATTRS{idProduct}==&quot;0001&quot;, MODE=&quot;0660&quot;, TAG+=&quot;uaccess&quot;, TAG+=&quot;udev-acl&quot; OWNER=&quot;&amp;lt;UNIX username&amp;gt;&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Reload the rules. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;udevadm control --reload-rules &amp;amp;&amp;amp; udevadm trigger&lt;/code&gt;. Optionally just unplug and replug your Nano S.&lt;/li&gt;
  &lt;li&gt;Your Nano S should now present you with its public key on its screen. See the usb listing:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; lsusb -d 2c97:0001 -v
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Verify Authenticity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following will ensure that you are using a valid Nano S. Sources: &lt;a href=&quot;https://support.ledgerwallet.com/hc/en-us/articles/115005321449-How-to-verify-the-security-integrity-of-my-Nano-S-&quot;&gt;Ledger Nano S help page&lt;/a&gt; and &lt;a href=&quot;https://github.com/LedgerHQ/blue-loader-python&quot;&gt;Python Tools for Ledger Nano S&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install libudev-dev libusb-1.0.0-dev python-dev virtualenv&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;virtualenv ledger&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source ledger/bin/activiate&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pip install ECPy==0.8.1&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pip install --no-cache-dir ledgerblue&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;For firmware 1.3.1 or below: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python -m ledgerblue.checkGenuine --targetId 0x31100002&lt;/code&gt; else &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python -m ledgerblue.checkGenuine --targetId 0x31100003&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should now be confident in your device and be able to load apps using their &lt;a href=&quot;https://chrome.google.com/webstore/detail/ledger-manager/beimhnaefocolcplfimocfiaiefpkgbf&quot;&gt;ledger manager&lt;/a&gt;&lt;/p&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">This is a quick HOW-TO for getting your new Ledger Nano S running in Ubuntu</summary></entry><entry><title type="html">Mpow Bluetooth Receiver Streambot Car Modification</title><link href="https://bauerjj.com/blog/mpow-bluetooth-receiver-car-modification/" rel="alternate" type="text/html" title="Mpow Bluetooth Receiver Streambot Car Modification" /><published>2018-03-12T00:00:00-07:00</published><updated>2018-03-12T00:00:00-07:00</updated><id>https://bauerjj.com/blog/mpow-bluetooth-receiver-car-modification</id><content type="html" xml:base="https://bauerjj.com/blog/mpow-bluetooth-receiver-car-modification/">&lt;p&gt;WORK IN PROGRESS&lt;/p&gt;

&lt;p&gt;I received an &lt;a href=&quot;https://www.amazon.com/Mpow-Bluetooth-Receiver-Streambot-Hands-Free/dp/B00MJMV0GU&quot;&gt;Mpow Bluetooth Receiver&lt;/a&gt; as a gift for use in my car. It quickly became apparent that I would have to manually turn ON the device every time I got in my car to have it connect to my phone. This required a 2-3 second hold on the play/pause button. I also had to turn it OFF once I arrived at my apartment since my phone would stay connected to it after I left my car. I found this tedious, so I created a simple modification that would no longer require any turning ON/OFF the adapter. The bluetooth receiver would turn ON automatically with the car and connect to your phone. It would then turn OFF with the car battery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modification&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Parts&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.digikey.com/product-detail/en/microchip-technology/VN2222LL-G/VN2222LL-G-ND/4902401&quot;&gt;VN2222LL-G-ND&lt;/a&gt; MOSFET N-CH 60V 0.23A TO92-3&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.digikey.com/product-detail/en/tdk-corporation/FK26X7R1C475K/445-2873-ND/1008899&quot;&gt;445-2873-ND&lt;/a&gt; CAP CER 4.7UF 16V X7R RADIAL&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.digikey.com/product-detail/en/yageo/MFR-25FBF52-100K/100KXBK-ND/13473&quot;&gt;100KXBK-ND&lt;/a&gt; RES 100K OHM 1/4W 1% AXIAL&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RNF14FTD1K00/RNF14FTD1K00CT-ND/1975018&quot;&gt;RNF14FTD1K00CT-ND&lt;/a&gt; RES 1K OHM 1/4W 1% AXIAL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The basic premise is as follows:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Car turns ON, button press is simulated as pressed immediately. Bluetooth search sequence initiated on the Mpow.&lt;/li&gt;
  &lt;li&gt;Capacitor chargers for approximately 2-3 seconds until a threshold of between 0.6-2.5V is reached. The exact turn ON voltage depends on the transistor&lt;/li&gt;
  &lt;li&gt;Button press is simulated as being lifted. Mpow should be connected to phone now.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;R1 and C1 create a classic low-pass filter with a charging rate equivalent to the resistance multiplied by the capacitance. We want to carefully tune these values to turn ON transistor Q1 after 3 seconds. This should put the Mpow in its discovery mode so that our phone can connect to it automatically when the car is started. R2 needs to be chosen so that the microcontroller on the Mpow sees a logic 1 (3.7V) when Q1 is OFF. I experimented with a few different values here and arrived at 1k.&lt;/p&gt;

&lt;p&gt;I used LTspice to simulate the circuit before I built it. Q1 will start turning ON around 0.6V. The exact turn ON voltage varies between the silicon, so some expermientation may be required. I found a value of XXX to work with the simulation and in real-life.&lt;/p&gt;

&lt;p&gt;Open the case up&lt;/p&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">WORK IN PROGRESS</summary></entry><entry><title type="html">Terminator Setup in Ubuntu</title><link href="https://bauerjj.com/blog/terminator-setup-ubuntu/" rel="alternate" type="text/html" title="Terminator Setup in Ubuntu" /><published>2017-10-19T00:00:00-07:00</published><updated>2017-10-19T00:00:00-07:00</updated><id>https://bauerjj.com/blog/terminator-setup-ubuntu</id><content type="html" xml:base="https://bauerjj.com/blog/terminator-setup-ubuntu/">&lt;p&gt;I have found that &lt;a href=&quot;https://gnometerminator.blogspot.com/p/introduction.html&quot;&gt;terminator&lt;/a&gt; is one of the best terminal programs available for managing multiple terminals. I was tired of switching between contexts until I stumbled upon terminator. It makes it easy to spawn multiple terminal instances within a single window by creating another tab or by splitting the existing terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install&lt;/strong&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here is my example config. This will create a 4 window pane. Paste this inside of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/terminator/config&lt;/code&gt;. You may need to create the file if it isn’t there. Restart terminator to see the new setup. Be sure to replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jbauer&lt;/code&gt; with your username.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/terminator.png&quot; alt=&quot;4-screen terminator&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[global_config]
  inactive_color_offset = 0.99
  suppress_multiple_term_dialog = True
[keybindings]
  copy = &amp;lt;Control&amp;gt;
  paste = &amp;lt;Control&amp;gt;v
[layouts]
  [[default]]
    [[[child0]]]
      fullscreen = False
      last_active_term = 87bdb8ee-fa88-4131-97c9-2209607d2fed
      last_active_window = True
      maximised = False
      order = 0
      parent = &quot;&quot;
      position = 525:100
      size = 1249, 733
      title = jbauer@ubuntu: ~
      type = Window
    [[[child1]]]
      order = 0
      parent = child0
      position = 594
      ratio = 0.477582065653
      type = HPaned
    [[[child2]]]
      order = 0
      parent = child1
      position = 366
      ratio = 0.50272851296
      type = VPaned
    [[[child5]]]
      order = 1
      parent = child1
      position = 366
      ratio = 0.50272851296
      type = VPaned
    [[[terminal3]]]
      directory = /home/jbauer/Desktop
      order = 0
      parent = child2
      profile = default
      type = Terminal
      uuid = d1af43fc-c268-4e1d-a53d-dd501827ac55
    [[[terminal4]]]
      order = 1
      parent = child2
      profile = default
      type = Terminal
      uuid = f25f1048-779f-4c96-a7c4-fd63554cb278
    [[[terminal6]]]
      order = 0
      parent = child5
      profile = default
      type = Terminal
      uuid = 87bdb8ee-fa88-4131-97c9-2209607d2fed
    [[[terminal7]]]
      directory = /home/jbauer/Desktop
      order = 1
      parent = child5
      profile = default
      type = Terminal
      uuid = f281f00c-958e-40d3-84d5-a87294fbb75f
  [[cool]]
    [[[child0]]]
      fullscreen = False
      last_active_term = 87bdb8ee-fa88-4131-97c9-2209607d2fed
      last_active_window = True
      maximised = False
      order = 0
      parent = &quot;&quot;
      position = 525:100
      size = 1249, 733
      title = jbauer@ubuntu: ~
      type = Window
    [[[child1]]]
      order = 0
      parent = child0
      position = 594
      ratio = 0.477582065653
      type = HPaned
    [[[child2]]]
      order = 0
      parent = child1
      position = 366
      ratio = 0.50272851296
      type = VPaned
    [[[child5]]]
      order = 1
      parent = child1
      position = 366
      ratio = 0.50272851296
      type = VPaned
    [[[terminal3]]]
      order = 0
      parent = child2
      profile = default
      type = Terminal
      uuid = d1af43fc-c268-4e1d-a53d-dd501827ac55
    [[[terminal4]]]
      order = 1
      parent = child2
      profile = default
      type = Terminal
      uuid = f25f1048-779f-4c96-a7c4-fd63554cb278
    [[[terminal6]]]
      order = 0
      parent = child5
      profile = default
      type = Terminal
      uuid = 87bdb8ee-fa88-4131-97c9-2209607d2fed
    [[[terminal7]]]
      order = 1
      parent = child5
      profile = default
      type = Terminal
      uuid = f281f00c-958e-40d3-84d5-a87294fbb75f
  [[defaultold]]
    [[[child1]]]
      parent = window0
      profile = default
      type = Terminal
    [[[window0]]]
      parent = &quot;&quot;
      type = Window
[plugins]
[profiles]
  [[default]]
    background_image = None
    font = Sans 10
    scroll_on_output = False
    scrollback_infinite = True
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">I have found that terminator is one of the best terminal programs available for managing multiple terminals. I was tired of switching between contexts until I stumbled upon terminator. It makes it easy to spawn multiple terminal instances within a single window by creating another tab or by splitting the existing terminal.</summary></entry><entry><title type="html">Three Phase Vector Diagram in Qt QML</title><link href="https://bauerjj.com/blog/three-phase-vector-diagram-in-qt/" rel="alternate" type="text/html" title="Three Phase Vector Diagram in Qt QML" /><published>2017-10-12T00:00:00-07:00</published><updated>2017-10-12T00:00:00-07:00</updated><id>https://bauerjj.com/blog/three-phase-vector-diagram-in-qt</id><content type="html" xml:base="https://bauerjj.com/blog/three-phase-vector-diagram-in-qt/">&lt;p&gt;I needed to draw a phasor diagram that is typical of a three-phase power system. I chose Qt because I was most comfortable with the framework. I quickly realized that there exists no such readily available QML element, so I decided to write my own. The code requires QtQuick 2 and Qt 5.5+&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/polar_chart.gif&quot; alt=&quot;Vector Diagram in Qt QML&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It uses the &lt;a href=&quot;http://doc.qt.io/qt-5/qml-qtquick-context2d.html&quot;&gt;Context2D&lt;/a&gt; object to grab the context and draw vectors along with the arrow head. I override the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onPaint&lt;/code&gt; method to perform all of the math and drawing required. The graph does not appear to cause any performance issues on an iMX6Q processor. I use some trigonometry to calculate the length and displacement of each vector. There is a dynamically loaded &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text&lt;/code&gt; element where I place descriptive text such as “V1” or “I1” to designate voltage or current. There is also a timer that increments the angles through its full range of motion for testing purposes.&lt;/p&gt;

&lt;p&gt;I included a few links at the top of the source that helped me with the mathematics. Please let me know if you have any questions.&lt;/p&gt;

&lt;h3 id=&quot;vectordiaqml&quot;&gt;VectorDia.qml&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import QtQuick 2.0
import &quot;qrc:/utility&quot;

/*
 * Inspiration:
 *
 *   https://woboq.com/blog/animations-using-the-qtquick-canvas.html
 *   http://stackoverflow.com/questions/26044801/draw-na-arc-circle-sector-in-qml
 *   https://forum.qt.io/topic/56628/qml-canvas-dashed-dotted-lines/2
*/

Canvas {
    id: canvas
    width: 480
    height: 272 - 20

    signal rightMove()
    signal leftMove()
    signal loaded()

    Component.onCompleted: {
        canvas.onLoaded()
    }

    property int vVectorLength: 90
    property int iVectorLength: (.75 * vVectorLength)
    property real start_x: width/2
    property real start_y: 15
    property real end_x: width/2
    property real end_y: height - 15
    property bool dashed: true
    property real dash_length: 3
    property real dash_space: 4
    property real line_width: 0.9
    property real stipple_length: (dash_length + dash_space) &amp;gt; 0 ? (dash_length + dash_space) : 16
    property color draw_color: &quot;black&quot;

    property variant vectors: [0,30,120,120,240,210] // test vectors

    property variant alt: [0,0,0,0,0,0]
    property int i: 0

    property var comp;
    property   var text;


    Timer{ // test timer to paint random stuff
        interval: 500; running: true; repeat: true;
        onTriggered: {
            canvas.requestPaint()
        }
    }




    onPaint: {
        // Get the drawing context
        var ctx = canvas.getContext('2d')
        canvas.i = 0;
        for(var j = 0; j &amp;lt;canvas.alt.length; j++){
            if(alt[j]!== 0)
                alt[j].destroy();
        }

        ctx.fillStyle = &quot;#ffffff&quot;; // &quot;erase&quot; the previously drawn stuff
        ctx.fillRect(0,0,canvas.width,canvas.height,&quot;#000000&quot;)

        // set line color
        ctx.strokeStyle = draw_color;
        ctx.lineWidth = line_width;
        ctx.beginPath();


        var centreX = canvas.width / 2;
        var centreY = canvas.height / 2;

        // draw the circle
        ctx.beginPath();
        ctx.lineWidth = 2
        ctx.fillStyle = &quot;black&quot;;
        ctx.arc(centreX, centreY, (width / 4) - 10, 0, Math.PI * 2, false);
        ctx.stroke();

        // make the dashed lines
        drawDashed(ctx,start_x, start_y, end_x, end_y);
        drawDashed(ctx,130, height/2, width - 130, height/2);

        // draw the vectors
        drawVector(ctx, true, 1, vectors[0], &quot;V&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&quot;);
        drawVector(ctx, false, 1, vectors[1], &quot;I&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&quot;);
        drawVector(ctx, true, 2, vectors[2], &quot;V&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&quot;);
        drawVector(ctx, false, 2, vectors[3], &quot;I&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&quot;);
        drawVector(ctx, true, 3, vectors[4], &quot;V&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;&quot;);
        drawVector(ctx, false, 3, vectors[5], &quot;I&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;&quot;);

        var i;
        for(i = 0; i &amp;lt; vectors.length; i++){
            vectors[i] += 5; // add some degrees for demo
            if(vectors[i] &amp;gt; 360)
                vectors[i] -= 360
        }

    }

    // QML Math library uses radians and not degrees
    function degToRad(deg){
        return deg * (Math.PI/180);
    }




    function drawVector(ctx, isVoltage, phase, angle, label){ // no guards in place for parameters

        var centreX = canvas.width / 2;
        var centreY = canvas.height / 2;
        var vectorLength = isVoltage === true ? vVectorLength : iVectorLength; // current and voltage vectors diff length
        var color; // line color determined from which vector is being drawn

        if(phase === 1)
            color = &quot;red&quot;;
        else if(phase === 2)
            color = &quot;#e5e500&quot;;
        else if(phase === 3)
            color = &quot;green&quot;;
        else
            color = &quot;black&quot;;


        // draw the line
        ctx.strokeStyle = color;
        ctx.fillStyle= color;
        ctx.beginPath()
        var x = Math.cos(degToRad(angle)) * vectorLength;
        var y = Math.sin(degToRad(angle)) * vectorLength;
        ctx.moveTo(centreX, centreY)
        ctx.lineTo(x + centreX, y + centreY);
        ctx.stroke();

        // now draw the triangle
        // Derive the two points that make the triangle from the center point
        // by making a slighly short radius at a few degrees to the left and right
        // from the center point
        ctx.beginPath();
        var triCenterX = x + centreX;
        var triCenterY = y + centreY
        var leftX = Math.cos(degToRad(angle + 3)) * (vectorLength - 7);
        var leftY = Math.sin(degToRad(angle + 3)) * (vectorLength - 7);
        var rightX = Math.cos(degToRad(angle - 3)) * (vectorLength - 7);
        var rightY = Math.sin(degToRad(angle - 3)) * (vectorLength - 7);

        ctx.moveTo(triCenterX,triCenterY);
        ctx.lineTo(leftX + centreX, leftY + centreY);
        ctx.lineTo(rightX + centreX, rightY + centreY);
        ctx.closePath();
        ctx.fill(); // fill the triangle


        comp = Qt.createComponent(&quot;qrc:/utility/MyLabel.qml&quot;)

        if (comp.status === Component.Ready)
            finishCreation(angle,label,triCenterX,triCenterY);
        else
            comp.statusChanged.connect(finishCreation(angle,label,triCenterX,triCenterY));

    }

    // Now draw the text next to the arrows
    // Check which of the 4 quadrants we are in so that text placement
    // is optimal
    function finishCreation(angle,label,triCenterX,triCenterY) {
        if (comp.status === Component.Ready) {

            if(angle &amp;gt; 180 &amp;amp;&amp;amp; angle &amp;lt; 360 )
                text = comp.createObject(canvas,{&quot;x&quot;: triCenterX , &quot;y&quot;: triCenterY -15});
               // text = comp.createObject(canvas,{&quot;x&quot;: triCenterX, &quot;y&quot;: triCenterY - 15});
            //if(angle &amp;gt; 270 &amp;amp;&amp;amp; angle &amp;lt;= 360 )
              //  text = comp.createObject(canvas,{&quot;x&quot;: triCenterX + 10, &quot;y&quot;: triCenterY - 15});
            else //if(angle &amp;gt; 0 &amp;amp;&amp;amp; angle &amp;lt;= 180 )
                text = comp.createObject(canvas,{&quot;x&quot;: triCenterX, &quot;y&quot;: triCenterY + 2});
            text.name = label;

            canvas.alt[canvas.i++] = text;

            if (text === null) {
                // Error Handling
                console.log(&quot;Error creating object&quot;);
            }
        } else if (comp.status === Component.Error) {
            // Error Handling
            console.log(&quot;Error loading component:&quot;, comp.errorString());
        }
    }


    function drawDashed(ctx,startX, startY, endX, endY){
        // make the dashed line
        var dashLen = stipple_length;
        var dX = endX - startX;
        var dY = endY - startY;
        var dashes = Math.floor(Math.sqrt(dX * dX + dY * dY) / dashLen);

        if (dashes == 0)
        {
            dashes = 1;
        }
        var dash_to_length = dash_length/dashLen
        var space_to_length = 1 - dash_to_length
        var dashX = dX / dashes;
        var dashY = dY / dashes;
        var x1 = startX;
        var y1 = startY;

        ctx.moveTo(x1,y1);

        var q = 0;
        while (q++ &amp;lt; dashes) {
            x1 += dashX*dash_to_length;
            y1 += dashY*dash_to_length;
            ctx.lineTo(x1, y1);
            x1 += dashX*space_to_length;
            y1 += dashY*space_to_length;
            ctx.moveTo(x1, y1);

        }
        ctx.stroke();
    }

    Text {
        id: text1
        x: 100
        y: 119
        text: qsTr(&quot;180°&quot;)
        font.pixelSize: 10
    }

    Text {
        id: text2
        x: 355
        y: 119
        width: 20
        height: 12
        text: qsTr(&quot;0°&quot;)
        font.pixelSize: 10
    }

    Text {
        id: text3
        x: 231
        y: 239
        text: qsTr(&quot;-90°&quot;)
        font.pixelSize: 10
    }



    Text {
        id: text4
        x: 233
        y: 2
        text: qsTr(&quot;90°&quot;)
        font.pixelSize: 10
    }


    Text {
        id: update
        x: 8
        y: 13
        text: qsTr(&quot;|&quot;)
        font.pixelSize: 20
        //verticalAlignment: Text.verticalCenter
        horizontalAlignment: Text.horizontalCenter
    }

    Timer{
        interval: 500 //500ms
        repeat: true
        running: true
        onTriggered: {
            if(update.text == &quot;|&quot;)
                update.text = &quot;/&quot;;
            else if(update.text == &quot;/&quot;)
                update.text = &quot;--&quot;;
            else if(update.text == &quot;--&quot;)
                update.text = &quot;\\&quot;
            else if(update.text == &quot;\\&quot;)
                update.text = &quot;|&quot;

        }
    }


}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;mylabelqml&quot;&gt;MyLabel.qml&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import QtQuick 2.0

Text{
    id: textId
    property string name: &quot;&quot;;
    text: textId.name
    textFormat: Text.RichText
    font.pixelSize: 12

    function destoryMe(){
        textId.destory()
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">I needed to draw a phasor diagram that is typical of a three-phase power system. I chose Qt because I was most comfortable with the framework. I quickly realized that there exists no such readily available QML element, so I decided to write my own. The code requires QtQuick 2 and Qt 5.5+</summary></entry><entry><title type="html">Installing jekyll on Linux</title><link href="https://bauerjj.com/blog/install-jekyll-on-linux/" rel="alternate" type="text/html" title="Installing jekyll on Linux" /><published>2017-07-27T00:00:00-07:00</published><updated>2017-07-27T00:00:00-07:00</updated><id>https://bauerjj.com/blog/install-jekyll-on-linux</id><content type="html" xml:base="https://bauerjj.com/blog/install-jekyll-on-linux/">&lt;p&gt;I use &lt;a href=&quot;https://jekyllrb.com/docs/installation/&quot;&gt;jekyll&lt;/a&gt; on some of my projects to produce a static html web page, like this one. I can easily edit the source and have an OK looking frontend without doing much CSS work. I find myself googling a few things from the errors I get inside the terminal as I try to install jekyll and all the necessary components needed to serve my web page. Here is a condensed version of what needs to be installed to have your github page served locally.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install ruby gem ruby-dev ruby-bundler zlib1g-dev nodejs&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo gem install jekyll nokogiri&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle install&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, in your github pages repo, you can now run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle exec jekyll serve&lt;/code&gt;&lt;/p&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">I use jekyll on some of my projects to produce a static html web page, like this one. I can easily edit the source and have an OK looking frontend without doing much CSS work. I find myself googling a few things from the errors I get inside the terminal as I try to install jekyll and all the necessary components needed to serve my web page. Here is a condensed version of what needs to be installed to have your github page served locally.</summary></entry><entry><title type="html">Automate Jekyll Production</title><link href="https://bauerjj.com/blog/automate-jekyll-production/" rel="alternate" type="text/html" title="Automate Jekyll Production" /><published>2017-07-27T00:00:00-07:00</published><updated>2017-07-27T00:00:00-07:00</updated><id>https://bauerjj.com/blog/automate-jekyll-production</id><content type="html" xml:base="https://bauerjj.com/blog/automate-jekyll-production/">&lt;p&gt;The main benefit I see of using jekyll is being able to edit a plain markdown file and have it appear live on the Internet in just a few seconds. In order for this to happen, I have to perform the following:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Make an edit&lt;/li&gt;
  &lt;li&gt;Build the website&lt;/li&gt;
  &lt;li&gt;Commit and push the changes to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch&lt;/li&gt;
  &lt;li&gt;Copy the contents under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_site&lt;/code&gt; from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; folder into the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;production&lt;/code&gt; folder&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CD&lt;/code&gt; into the production-ready folder&lt;/li&gt;
  &lt;li&gt;Commit and push the changes to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;master&lt;/code&gt; branch&lt;/li&gt;
  &lt;li&gt;Wait 5 seconds for github to publish the changes live on github.io.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I wanted a way to automate this.&lt;/p&gt;

&lt;p&gt;I have to perform the above steps since I am using &lt;a href=&quot;https://github.com/ayastreb/jekyll-maps&quot;&gt;jekyll-maps&lt;/a&gt; which is not one of the &lt;a href=&quot;https://pages.github.com/versions/&quot;&gt;approved plugins&lt;/a&gt; that I can use on github pages. This forces me to NOT have github automatically build my jekyll site. I must therefore upload all of the static HTML content on my master branch and have my source files in a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gh-pages&lt;/code&gt; branch. Github pages will serve the static content from the master branch live for you for free!&lt;/p&gt;

&lt;p&gt;I created two folders, one for production and one for source edits. I did the following after already creating the gh-pages branch previously:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd ~/Documents/github&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mkdir production source&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd production; git pull &amp;lt;my_git_repo&amp;gt;.git; git checkout master&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd ../source; git pull &amp;lt;my_git_repo&amp;gt;.git; git checkout gh-pages&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have already forked a &lt;a href=&quot;https://github.com/mmistakes/minimal-mistakes&quot;&gt;jekyll theme&lt;/a&gt; that includes all of the scaffolding. I can &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CD&lt;/code&gt; into the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source&lt;/code&gt; folder, make an edit, and push my changes. I can see the website live on my localhost by running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle exec jekyll serve&lt;/code&gt;. All of the links are relative to my localhost, so I now need to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;export JEKYLL_ENV=production&lt;/code&gt; so that jekyll will produce links with my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://bauerjj.github.io&lt;/code&gt; baseurl.&lt;/p&gt;

&lt;p&gt;This is where I encounter a &lt;a href=&quot;https://github.com/jekyll/jekyll/issues/6057&quot;&gt;jekyll bug&lt;/a&gt; that causes a double slash (//) in place of where a single slash should be (/). For example, links will show up as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://bauerjj.github.io//blog&lt;/code&gt; instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://bauerjj.github.io/blog&lt;/code&gt;. I followed &lt;a href=&quot;https://github.com/jekyll/jekyll/issues/6057&quot;&gt;jira 6057&lt;/a&gt; and its proposed solution of using &lt;a href=&quot;https://github.com/jekyll/jekyll/pull/6058&quot;&gt;URLFilters&lt;/a&gt;, however I was not able to resolve my problem. I created a simple script instead that fixes the slashes in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_site&lt;/code&gt; directory by iteratiing through all of the files and performing a replace. My config has this: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;baseurl                  : &quot;/&quot;&lt;/code&gt;. Notice how I put multiple slahes. This was so that the script could look for 5 slashes and do the replace since some valid &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;//&lt;/code&gt; occur such as those in an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://&lt;/code&gt; url.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/bash
# Small script that replaces \\\\\ with a single \ 
FILES=$(find ./ -type f -name '*')
for file in $FILES; do
   sed -i -e 's/\/\/\/\/\//\//g' $file
done
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I then needed a method to monitor the source directory for any changes and then commit, push, and deploy the static content up to github for me. I used &lt;a href=&quot;https://github.com/nevik/gitwatch&quot;&gt;gitwatch&lt;/a&gt; and forked it so that I could customize it do run my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;replace.sh&lt;/code&gt; script, copy the static contents to my production folder, and then commit/push everything to github. You can see my simple changes to the script &lt;a href=&quot;https://github.com/bauerjj/gitwatch/blob/master/gitwatch.sh&quot;&gt;on my own fork&lt;/a&gt;. Now, just execute &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./gitwatch&lt;/code&gt; and watch it do its magic whenever you edit a source file!&lt;/p&gt;

&lt;p&gt;Please let me know if you have any problems.&lt;/p&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">The main benefit I see of using jekyll is being able to edit a plain markdown file and have it appear live on the Internet in just a few seconds. In order for this to happen, I have to perform the following:</summary></entry><entry><title type="html">UD-3900 Pluggable Docking Station with Ubuntu Dual-Monitors</title><link href="https://bauerjj.com/blog/how-to-install-plugable-usb-3-0-docking-station-ubuntu/" rel="alternate" type="text/html" title="UD-3900 Pluggable Docking Station with Ubuntu Dual-Monitors" /><published>2017-07-11T01:03:00-07:00</published><updated>2017-07-11T01:03:00-07:00</updated><id>https://bauerjj.com/blog/how-to-install-plugable-usb-3-0-docking-station-ubuntu</id><content type="html" xml:base="https://bauerjj.com/blog/how-to-install-plugable-usb-3-0-docking-station-ubuntu/">&lt;p&gt;I struggled for a bit to get my &lt;a href=&quot;plugable.com/products/ud-3900/&quot;&gt;UD-3900&lt;/a&gt; working under Ubuntu MATE 16.04.2. Here are the steps I took:&lt;/p&gt;

&lt;p&gt;1) Ensure that the kernel is AT LEAST 4.8 by running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uname -r&lt;/code&gt;. I tried to downgrade my kernel to 4.4 after failing a few times to no avail.&lt;/p&gt;

&lt;p&gt;2) Update your system. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get update&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get dist-upgrade&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;3) &lt;a href=&quot;http://www.displaylink.com/downloads/ubuntu&quot;&gt;Download the DisplayLink Driver&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) If you haven’t already, install dkms &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install dkms&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chmod a+x displaylink-driver-xxxx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;6) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./displaylink-driver-xx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;7) nano &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/share/X11/xorg.cong.d/20-displaylink.conf&lt;/code&gt;
   Paste this into that file:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Section &quot;Device&quot; 
  Identifier &quot;Intel Graphics&quot;
  Driver &quot;intel&quot;
EndSection
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;8) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reboot&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After a reboot, I had to wait 50 seconds before Ubuntu recognized the screens. If something went wrong, you can uninstall the driver &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo displaylink-installer uninstall&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lsusb&lt;/code&gt; to see if the driver is installed or not.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://support.displaylink.com/knowledgebase/articles/1181623-displaylink-ubuntu-driver-after-recent-x-upgrades&quot;&gt;DisplyLink Troubleshoot Article&lt;/a&gt;&lt;/p&gt;</content><author><name>Justin Bauer</name><email>bauerjj@pm.me</email><uri>http://mcuhq.com</uri></author><category term="blog" /><summary type="html">I struggled for a bit to get my UD-3900 working under Ubuntu MATE 16.04.2. Here are the steps I took:</summary></entry></feed>