<?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"><channel><title><![CDATA[Brian Daley]]></title><description><![CDATA[Brian Daley]]></description><link>https://briandaley.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 15 Oct 2026 10:59:46 GMT</lastBuildDate><atom:link href="https://briandaley.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A quick shout-out to apt-smart]]></title><description><![CDATA[I recently had the pleasure of performing a release upgrade on an old Ubuntu server. The upgrade kept failing due to issues with the mirrors that were listed in /etc/apt/sources.list. Rather than resolving the issue by manually editing the sources, I...]]></description><link>https://briandaley.dev/a-quick-shout-out-to-apt-smart</link><guid isPermaLink="true">https://briandaley.dev/a-quick-shout-out-to-apt-smart</guid><category><![CDATA[Linux]]></category><category><![CDATA[Ubuntu]]></category><category><![CDATA[#ServerAdministration]]></category><category><![CDATA[sysadmin]]></category><dc:creator><![CDATA[Brian Daley]]></dc:creator><pubDate>Fri, 13 Feb 2026 19:56:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/4Mw7nkQDByk/upload/dc5b330ae14c65a4cea907366f1c3014.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I recently had the pleasure of performing a release upgrade on an old Ubuntu server. The upgrade kept failing due to issues with the mirrors that were listed in <code>/etc/apt/sources.list</code>. Rather than resolving the issue by manually editing the sources, I stumbled across apt-smart, which auto-updated my mirror list, optimizing for speed.</p>
<p>Check it out here: <a target="_blank" href="https://github.com/martin68/apt-smart">https://github.com/martin68/apt-smart</a></p>
<p>After installing the package, I let apt-smart automatically fix my broken mirrors:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Discover available mirrors, rank the mirrors by connection speed and </span>
<span class="hljs-comment"># update status and update /etc/apt/sources.list to use the best available mirror.</span>
sudo apt-smart -a
</code></pre>
<p>A few minutes later I was running the release upgrade without issue.</p>
<p><img src="https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExYm90Z3c0MGRjZGdjY2F2MzdkemdlY2lydGl5OTdodTkzeTBwaDM1MiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/fkD36jhiqzJ9m/giphy.gif" alt /></p>
<h2 id="heading-latest-docs">Latest Docs</h2>
<ul>
<li><a target="_blank" href="https://apt-smart.readthedocs.io/en/latest/#">https://apt-smart.readthedocs.io/en/latest/</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Awesome Frontend Newsletters]]></title><description><![CDATA[This is a curated list of newsletters that I use to stay up-to-date on the latest trends in web design.
Web Design

https://webweekly.email/

https://webtoolsweekly.com/

https://tympanus.net/codrops/collective/

https://css-weekly.com/

https://www....]]></description><link>https://briandaley.dev/awesome-newsletters</link><guid isPermaLink="true">https://briandaley.dev/awesome-newsletters</guid><category><![CDATA[frontend]]></category><category><![CDATA[CSS]]></category><category><![CDATA[HTML]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[newsletter]]></category><category><![CDATA[Design]]></category><category><![CDATA[Web Design]]></category><category><![CDATA[Accessibility]]></category><category><![CDATA[UI]]></category><category><![CDATA[UX]]></category><dc:creator><![CDATA[Brian Daley]]></dc:creator><pubDate>Thu, 07 Nov 2024 16:53:45 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/_Zua2hyvTBk/upload/5cc12bc6b1e6395e87666406a26415e9.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is a curated list of newsletters that I use to stay up-to-date on the latest trends in web design.</p>
<h2 id="heading-web-design">Web Design</h2>
<ul>
<li><p><a target="_blank" href="https://webweekly.email/">https://webweekly.email/</a></p>
</li>
<li><p><a target="_blank" href="https://webtoolsweekly.com/">https://webtoolsweekly.com/</a></p>
</li>
<li><p><a target="_blank" href="https://tympanus.net/codrops/collective/">https://tympanus.net/codrops/collective/</a></p>
</li>
<li><p><a target="_blank" href="https://css-weekly.com/">https://css-weekly.com/</a></p>
</li>
<li><p><a target="_blank" href="https://www.smashingmagazine.com/the-smashing-newsletter/">https://www.smashingmagazine.com/the-smashing-newsletter/</a></p>
</li>
<li><p><a target="_blank" href="https://frontendfoc.us/">https://frontendfoc.us/</a></p>
</li>
<li><p><a target="_blank" href="https://web-design-weekly.com/">https://web-design-weekly.com/</a></p>
</li>
<li><p><a target="_blank" href="https://sidebar.io/">https://sidebar.io/</a></p>
</li>
</ul>
<h2 id="heading-uiux-design">UI/UX Design</h2>
<ul>
<li><a target="_blank" href="https://www.nngroup.com/articles/subscribe/">https://www.nngroup.com/articles/subscribe/</a></li>
</ul>
<h2 id="heading-accessibility">Accessibility</h2>
<ul>
<li><a target="_blank" href="https://www.a11y-collective.com/subscribe-to-our-newsletter/">https://www.a11y-collective.com/subscribe-to-our-newsletter/</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[E2E Testing with Nightwatch and Nuxt]]></title><description><![CDATA[The Nuxt team provides some  great documentation  on getting started with e2e testing using  Ava . But if you’re looking for a little more power, Nightwatch is worth a try.
Getting Started
I’m going to skip over the  installation details  and assume ...]]></description><link>https://briandaley.dev/e2e-testing-with-nightwatch-and-nuxt</link><guid isPermaLink="true">https://briandaley.dev/e2e-testing-with-nightwatch-and-nuxt</guid><category><![CDATA[Nuxt]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[vue]]></category><category><![CDATA[Vue.js]]></category><dc:creator><![CDATA[Brian Daley]]></dc:creator><pubDate>Wed, 17 Jun 2020 04:00:00 GMT</pubDate><content:encoded><![CDATA[<p><em>The Nuxt team provides some  <a target="_blank" href="https://nuxtjs.org/examples/testing">great documentation</a>  on getting started with e2e testing using  <a target="_blank" href="https://github.com/avajs/ava">Ava</a> . But if you’re looking for a little more power, Nightwatch is worth a try.</em></p>
<h2 id="getting-started">Getting Started</h2>
<p>I’m going to skip over the  <a target="_blank" href="https://nightwatchjs.org/gettingstarted/installation/">installation details</a>  and assume that we’re working on a project that contains the latest version of Nightwatch and an appropriate webdriver, like  <a target="_blank" href="https://nightwatchjs.org/gettingstarted/installation/#install-chromedriver">Chrome</a> .</p>
<h2 id="basic-configuration">Basic Configuration</h2>
<p>In the root directory of your project, Nightwatch will look for <code>nightwatch.json</code> or <code>nightwatch.conf.js</code>. In my example, I used a single <code>nightwatch.json</code> file to configure my webdriver. (I’m using Chrome in this instance.)</p>
<p>The  <a target="_blank" href="https://nightwatchjs.org/gettingstarted/configuration/#base-settings">nightwatch docs do a good job of explaining most of these settings</a>, so I’ll just highlight a couple that are relevant to our task.</p>
<h3 id="nightwatchjson">nightwatch.json</h3>
<pre><code class="lang-json">{
    <span class="hljs-attr">"src_folders"</span>: [
        <span class="hljs-string">"tests"</span>
    ],
    <span class="hljs-attr">"exclude"</span>: [
        <span class="hljs-string">"tests/globals.js"</span>
    ],
    <span class="hljs-attr">"webdriver"</span>: {
        <span class="hljs-attr">"start_process"</span>: <span class="hljs-literal">true</span>,
        <span class="hljs-attr">"server_path"</span>: <span class="hljs-string">"node_modules/.bin/chromedriver"</span>,
        <span class="hljs-attr">"cli_args"</span>: [
            <span class="hljs-string">"--verbose"</span>
        ],
        <span class="hljs-attr">"port"</span>: <span class="hljs-number">9515</span>
    },
    <span class="hljs-attr">"test_settings"</span>: {
        <span class="hljs-attr">"default"</span>: {
            <span class="hljs-attr">"desiredCapabilities"</span>: {
                <span class="hljs-attr">"browserName"</span>: <span class="hljs-string">"chrome"</span>
            },
            <span class="hljs-attr">"globals"</span>: {
                <span class="hljs-attr">"asyncHookTimeout"</span>: <span class="hljs-number">60000</span>
            }
        }
    },
    <span class="hljs-attr">"globals_path"</span>: <span class="hljs-string">"tests/globals.js"</span>
}
</code></pre>
<h2 id="exclude">exclude</h2>
<p>I have a global configuration file that I decided to store in the same directory as my tests. I suspect this isn’t considered best practice, but my root directory is already crowded enough. However, by placing this file in the <code>tests</code> directory, nightwatch tries to open the file and run tests. To avoid this, I’ve added the <code>tests/globals.js</code> file to the exclude array.</p>
<h2 id="globalspath">globals_path</h2>
<p>As I mentioned above, I have a file that contains global configuration and hooks for all of my tests. This option lets you instruct nightwatch where to find your global settings and hooks.</p>
<h2 id="globalsasynchooktimeout">globals.asyncHookTimeout</h2>
<p>In our <code>before</code> hook, which prepares our environment for testing, I’m building the app and running the server. However, nightwatch was timing out before Nuxt was finished building our app. So I set this value to 60 seconds. This gives our <code>before</code> and <code>after</code> hooks enough time to build and serve our app before moving on to running the tests.</p>
<p><em><strong>Note</strong>: Technically you should be able to set this value in the tests/globals.js that was created, but doing so caused the chromedriver to crash, so I just set the value here instead. 🤷‍♂️</em></p>
<h2 id="global-configuration-and-hooks">Global Configuration and Hooks</h2>
<p>As mentioned above, the global settings and hooks are stored in a javascript module, <code>tests/globals.js</code>.  <a target="_blank" href="https://github.com/nightwatchjs/nightwatch/blob/master/examples/globalsModule.js">Check out the source code for a complete set of properties</a> .</p>
<p><em><strong>Note</strong>: The example below is using Nuxt 2.8.1. There’s a good chance that the process for programmatically building and serving the app may have changed in recent versions.</em></p>
<h3 id="testsglobalsjs">tests/globals.js</h3>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> resolve = <span class="hljs-built_in">require</span>(<span class="hljs-string">'path'</span>).resolve;
<span class="hljs-keyword">const</span> Nuxt = <span class="hljs-built_in">require</span>(<span class="hljs-string">'nuxt'</span>).Nuxt;
<span class="hljs-keyword">const</span> Builder = <span class="hljs-built_in">require</span>(<span class="hljs-string">'nuxt'</span>).Builder;

<span class="hljs-comment">/**
 * Nightwatch
 * @url https://nightwatchjs.org/guide/
 */</span>

<span class="hljs-comment">// Used to store the nuxt server instance</span>
<span class="hljs-keyword">let</span> nuxtInstance = <span class="hljs-literal">null</span>;

<span class="hljs-built_in">module</span>.exports = {

  <span class="hljs-comment">// The host for nuxt server</span>
  <span class="hljs-attr">serverHost</span>: <span class="hljs-string">'localhost'</span>,

  <span class="hljs-comment">// Which port to run nuxt on</span>
  <span class="hljs-attr">serverPort</span>: <span class="hljs-number">5555</span>,

  <span class="hljs-attr">before</span> : <span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">browser, done</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Starting Nuxt Server"</span>)
    <span class="hljs-keyword">const</span> rootDir = resolve(__dirname, <span class="hljs-string">'../'</span>)
    <span class="hljs-keyword">let</span> config = {}
    <span class="hljs-keyword">try</span> { config = <span class="hljs-built_in">require</span>(resolve(rootDir, <span class="hljs-string">'nuxt.config.js'</span>)) } <span class="hljs-keyword">catch</span> (e) {}
    config.rootDir = rootDir <span class="hljs-comment">// project folder</span>
    <span class="hljs-keyword">const</span> nuxt = <span class="hljs-keyword">new</span> Nuxt(config)
    nuxtInstance = nuxt <span class="hljs-comment">// We keep a reference to Nuxt so we can close the server at the end of the test</span>
    <span class="hljs-keyword">await</span> <span class="hljs-keyword">new</span> Builder(nuxt).build()
    <span class="hljs-keyword">await</span> nuxt.server.listen(<span class="hljs-built_in">this</span>.serverPort, <span class="hljs-built_in">this</span>.serverHost)
    done();
  },

  <span class="hljs-attr">after</span> : <span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">browser, done</span>) </span>{
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Shutting Down Nuxt'</span>);
    <span class="hljs-keyword">await</span> nuxtInstance.close();
    done();
  },
}
</code></pre>
<p>The <code>before</code> method runs before our tests and fires up the Nuxt server to run locally on port 5555.</p>
<p>Once all of the tests are complete, the <code>after</code> method shuts down the Nuxt server instance.</p>
<h2 id="finally-writing-and-running-the-tests">Finally, writing and running the tests:</h2>
<p>Just to make sure things were working properly, I created a simple test that loads the app, waits for the body to load, and asserts that the title is correct.</p>
<h3 id="testsindextestjs">tests/index.test.js</h3>
<pre><code class="lang-javascript"><span class="hljs-comment">// Needed to get the serverHost and serverPort</span>
<span class="hljs-keyword">const</span> globals = <span class="hljs-built_in">require</span>(<span class="hljs-string">"./globals"</span>);

<span class="hljs-comment">/**
 * Nightwatch
 * @url Setup Guide https://nightwatchjs.org/guide/
 * @url API Reference https://nightwatchjs.org/api/commands/
 */</span>
<span class="hljs-built_in">module</span>.exports = {

  <span class="hljs-comment">// Set true to disable this test</span>
  <span class="hljs-attr">disabled</span>: <span class="hljs-literal">false</span>,

  <span class="hljs-string">'Page: /'</span> : <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">browser</span>) </span>{
    browser
      .url(<span class="hljs-string">`http://<span class="hljs-subst">${globals.serverHost}</span>:<span class="hljs-subst">${globals.serverPort}</span>`</span>)
      .waitForElementVisible(<span class="hljs-string">'body'</span>)
      .assert.titleContains(<span class="hljs-string">'Name of App'</span>)
      .end();
  }
}
</code></pre>
<p>I used my <code>globals.js</code> module to determine the host and port of our Nuxt server. The rest of the code is part of the  <a target="_blank" href="https://nightwatchjs.org/guide/#writing-tests">Nightwatch API</a>, which is super-readable.</p>
<p>Running
The last step is to add the nightwatch command to our <code>package.json</code>, so that we can easily run the tests with <code>yarn</code> or <code>npm</code>.</p>
<p>package.json</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"name"</span>: <span class="hljs-string">"my-cool-app"</span>,
  <span class="hljs-attr">"version"</span>: <span class="hljs-string">"1.0.0"</span>,
  <span class="hljs-attr">"private"</span>: <span class="hljs-literal">true</span>,
  <span class="hljs-attr">"scripts"</span>: {
    <span class="hljs-attr">"build"</span>: <span class="hljs-string">"nuxt build --spa"</span>,
    <span class="hljs-attr">"test"</span>: <span class="hljs-string">"nightwatch"</span>
  },
  ...
}
</code></pre>
<p>Now we can run our tests from the command line:</p>
<pre><code class="lang-bash">$ yarn run <span class="hljs-built_in">test</span>
</code></pre>
]]></content:encoded></item></channel></rss>