Jekyll2018-05-30T17:53:06+00:00http://blog.matthewalner.com/automattech blogMore often pointers to information rather than anything of substance. This blog acts more as a memory aid for me rather than a real blog. But if you think it’s interesting great!
console.table2018-05-29T00:00:00+00:002018-05-29T00:00:00+00:00http://blog.matthewalner.com/2018/05/29/console-table<h3 id="tldr">tl;dr</h3>
<p>console.table logs tabular data as a table, no more opening and closing dropdowns.</p>
<h3 id="--verbose">--verbose</h3>
<h4 id="with-consolelog-">with <code class="highlighter-rouge">console.log</code> =></h4>
<h4 id="log-code">log code:</h4>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">people</span> <span class="o">=</span> <span class="p">[{</span>
<span class="na">name</span><span class="p">:</span> <span class="s1">'Bill'</span><span class="p">,</span>
<span class="na">age</span><span class="p">:</span> <span class="mi">21</span><span class="p">,</span>
<span class="na">sex</span><span class="p">:</span> <span class="s1">'male'</span><span class="p">,</span>
<span class="na">dead</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">},</span> <span class="p">{</span>
<span class="na">name</span><span class="p">:</span> <span class="s1">'Jenny'</span><span class="p">,</span>
<span class="na">age</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span>
<span class="na">sex</span><span class="p">:</span> <span class="s1">'female'</span><span class="p">,</span>
<span class="na">dead</span><span class="p">:</span> <span class="kc">false</span>
<span class="p">}]</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">people</span><span class="p">);</span>
<span class="p">})();</span>
</code></pre>
</div>
<h4 id="log-result">log result:</h4>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-05-29-console-table/console_log_example.gif" alt="Console Log Example" title="Console Log Example" /></p>
<hr />
<h4 id="with-consoletable-">with <code class="highlighter-rouge">console.table</code> =></h4>
<h4 id="table-code">table code:</h4>
<div class="language-javascript highlighter-rouge"><pre class="highlight"><code><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="kr">const</span> <span class="nx">people</span> <span class="o">=</span> <span class="p">[{</span>
<span class="na">name</span><span class="p">:</span> <span class="s1">'Bill'</span><span class="p">,</span>
<span class="na">age</span><span class="p">:</span> <span class="mi">21</span><span class="p">,</span>
<span class="na">sex</span><span class="p">:</span> <span class="s1">'male'</span><span class="p">,</span>
<span class="na">dead</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">},</span> <span class="p">{</span>
<span class="na">name</span><span class="p">:</span> <span class="s1">'Jenny'</span><span class="p">,</span>
<span class="na">age</span><span class="p">:</span> <span class="mi">20</span><span class="p">,</span>
<span class="na">sex</span><span class="p">:</span> <span class="s1">'female'</span><span class="p">,</span>
<span class="na">dead</span><span class="p">:</span> <span class="kc">false</span>
<span class="p">}]</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">table</span><span class="p">(</span><span class="nx">people</span><span class="p">);</span>
<span class="p">})();</span>
</code></pre>
</div>
<h4 id="table-result">table result:</h4>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-05-29-console-table/console_table_example.png" alt="Console Table Example" title="Console Table Example" /></p>tl;drAudio out via Bluetooth and Headphone Jack Simultaneously2018-02-18T00:00:00+00:002018-02-18T00:00:00+00:00http://blog.matthewalner.com/2018/02/18/audio-out-via-bluetooth-and-headphone-jack-simultaneously<h3 id="tldr">tl;dr</h3>
<p>You can output your Macs audio to both a connected Bluetooth speaker/headphones and the headphone jack simultaneously using built-in settings.</p>
<ol>
<li>Open OSX’s built in <code class="highlighter-rouge">Audio MIDI Setup</code> application</li>
<li>Click the plus icon (bottom left).</li>
<li>Click “Create multi-output device”</li>
<li>Check the different devices you wish to this new device.</li>
<li>Select this as the new output in your <code class="highlighter-rouge">Sound Prefrences</code>.</li>
</ol>
<h3 id="--verbose">--verbose</h3>
<p>The other day my significant other and I were stuck in the purgatory of the airport lounge, waiting for our delayed flight.</p>
<p>It wasn’t all that bad we had our fill of tiny pastries, tea and wi-fi. We decided a movie would be a great way to pass the time. Each of us had a pair of headphones but both were over-ear. We couldn’t employ the traditional one earbud each trick. and we weren’t about to use the Mac’s speakers everyone hates <em>that</em> person.</p>
<p>I thought how hard could it be to have the audio be outputted through both the headphone jack and via Bluetooth. I thought id need the help of something like <a href="https://rogueamoeba.com/freebies/soundflower/">Soundflower</a>. It turns out, however, everything you need it built right into OSX.</p>
<p>Follow these steps below:</p>
<ul>
<li>Open up the <em>Audio MIDI Setup</em> application (located in the <code class="highlighter-rouge">Applications/Utilities</code> folder).</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/1_audio_midi_setup_in_spotlight.jpg" alt="Audio Midi Setup in Spotlight" title="Audio Midi Setup in Spotlight" /></p>
<ul>
<li>In the <em>audio devices</em> window that opens up, you’ll see a list of devices on the left and a little plus icon in the bottom left-hand corner. Click the plus icon.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/2_press_plus.jpg" alt="Press Plus" title="Press Plus" /></p>
<ul>
<li>Click <em>Create multi-output device</em> from the dropdown.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/3_create_multi_output_device.jpg" alt="Create Multi Output Device" title="Create Multi Output Device" /></p>
<ul>
<li>Check the devices you want to combine.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/4_check_outputs.jpg" alt="Check Outputs" title="Check Outputs" /></p>
<ul>
<li>Name your new combined output something sensible.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/5_rename.jpg" alt="Rename" title="Rename" /></p>
<ul>
<li>Select a <em>Master Device</em>, I go with the Bluetooth device. But to be honest I’m not entirely sure how this and the drift settings work.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/6_select_master_output.jpg" alt="Select Master Output" title="Select Master Output" /></p>
<ul>
<li>Head back to spotlight and open your <em>Sound Preferences</em>.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/7_sound_in_spotlight.jpg" alt="Sound In Spotlight" title="Sound In Spotlight" /></p>
<ul>
<li>Select your newly created output from the list.</li>
</ul>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2018-02-18-audio-out-via-bluetooth-and-headphone-jack-simultaneously/8_select_new_multi_output_device.jpg" alt="Select New Multi Output Device" title="Select New Multi Output Device" /></p>
<ul>
<li>Profit!</li>
</ul>tl;drCurated library of slack emoji2018-01-28T00:00:00+00:002018-01-28T00:00:00+00:00http://blog.matthewalner.com/2018/01/28/curated-library-of-slack-emoji<h3 id="tldr">tl;dr</h3>
<p>check out <a href="https://slackmojis.com/">here</a> for free slack emojis</p>
<h3 id="--verbose">--verbose</h3>
<p>So you can add custom emojis to slack not in the app but via the web interface <code class="highlighter-rouge">https://[yourdomain].slack.com/customize/emoji</code></p>
<p>keep in mind <em>Square images</em> work best. Image can’t be larger than <code class="highlighter-rouge">128px</code> in <em>width</em> or <em>height</em>, and must be smaller than <code class="highlighter-rouge">64KB</code> in file size.</p>
<p><img src="https://cdn.bulbagarden.net/upload/thumb/2/21/001Bulbasaur.png/250px-001Bulbasaur.png" alt="001Bulbasaur" class="img-responsive" /></p>tl;drGit has a built in web GUI!2017-09-11T00:00:00+00:002017-09-11T00:00:00+00:00http://blog.matthewalner.com/2017/09/11/git-has-a-built-in-web-gui<h3 id="tldr">tl;dr</h3>
<p>Turns out git has a built in web GUI on mac run <code class="highlighter-rouge">git instaweb --httpd=webrick</code></p>
<h3 id="--verbose">--verbose</h3>
<p>//TODO
I’ll expand this later but you’ll find what you need <a href="https://git-scm.com/book/en/v2/Git-on-the-Server-GitWeb">here</a>.</p>tl;drShell Check2017-08-13T00:00:00+00:002017-08-13T00:00:00+00:00http://blog.matthewalner.com/2017/08/13/shell-check<h3 id="tldr">tl;dr</h3>
<p>Not using a linter while bashing out shell scripts? you should be! Try
<a href="https://github.com/koalaman/shellcheck" title="ShellCheck">ShellCheck</a></p>
<h3 id="--verbose">--verbose</h3>
<p>//TODO</p>tl;drNeed Dev Related Svgs?2017-08-11T00:00:00+00:002017-08-11T00:00:00+00:00http://blog.matthewalner.com/2017/08/11/need-dev-related-svgs<h3 id="tldr">tl;dr</h3>
<p>A collection of 900+ svg vector logos <a href="https://svgporn.com/">here</a>.</p>
<h3 id="--verbose">--verbose</h3>
<p>I find myself needing vector logos of dev related stuff quite often. So I set out to make a collection that I was going to share. However in that search I found <a href="https://svgporn.com/">svgporn!</a> which was exactly what I was looking to build.</p>
<p><img src="http://res.cloudinary.com/automattech/image/upload/v1519340333/blog/2017-08-11-need-dev-related-svgs/screenshot-svgporn.png" alt="svgporn homepage" title="svgporn homepage" /></p>
<p>Missing what you need? it’s on <a href="https://github.com/gilbarbara/logos">github</a>, why don’t you add it?</p>tl;drGoogle No Translate2017-08-11T00:00:00+00:002017-08-11T00:00:00+00:00http://blog.matthewalner.com/2017/08/11/google-no-translate<h3 id="tldr">tl;dr</h3>
<p>Add <code class="highlighter-rouge"><meta name="google" content="notranslate" /></code> to the head of your page to stop Google offering to translate it.</p>
<h3 id="--verbose">--verbose</h3>
<p>I was recently building a page where the user could provide translations for a given piece of text.</p>
<p>Chromes usual “would you like to translate it” dropdown was getting very annoying. After some light googling I came across a <a href="https://stackoverflow.com/questions/7228972/disable-chrome-translation-bar-on-my-website">fix</a>. Just add <code class="highlighter-rouge"><meta name="google" content="notranslate" /></code> to the head of your page to stop Google offering to translate it.</p>
<p>There are a whole set of Meta tags that Google understands, have a look <a href="https://support.google.com/webmasters/answer/79812?hl=en">here</a>.</p>tl;dr