<?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[Blog by Brendon Lees]]></title><description><![CDATA[Full Stack Developer.]]></description><link>https://brendon1555.com</link><generator>GatsbyJS</generator><lastBuildDate>Thu, 27 Apr 2023 12:06:33 GMT</lastBuildDate><item><title><![CDATA[React Analogue Clock (Plus a custom Prop Type)]]></title><description><![CDATA[React Analogue Clock. My open-source React component using my own custom
PropTypes.]]></description><link>https://brendon1555.com/posts/react-analogue-clock</link><guid isPermaLink="false">https://brendon1555.com/posts/react-analogue-clock</guid><pubDate>Wed, 18 Mar 2020 10:29:31 GMT</pubDate><content:encoded>&lt;p&gt;For the last week or so I’ve been working on a React component as a bit of fun in my free time. I used it as an excuse to give typescript a shot and I’ve got to say; It’s not bad!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/brendon1555/react-analogue-clock&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;react-analogue-clock&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://www.npmjs.com/package/react-analogue-clock&quot;&gt;npm&lt;/a&gt;) is what I came up with. It’s a fairly simple React component that displays the current time live on a customisable analogue clock face.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 20.27027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABQUlEQVQY0wXBTShDAQDA8afkJMmNFdmFtIgUiih6DhaFopbSWDiw+UiJlIuIJFHEQSjkopRa851ltGdvb8xXZvbWHEZNFrXk7/cTotEQbt8mXv8OMaKEJQVnXTPuFhM/ryryZ4QGm0yb3Uv4L4bn8ITOglIsZSJhfwCnR6FjdIShmWnUYBDhRt3E5p3iMjSL+2Wb+zoDdk0Wd5ocPEYTeodK2uo1mr0g7UcKXdk6qpM0FAlx9JSLdE9Nou8xo+/tZ3xpEcEdWOfcN4tDnUN6WOO+uhFJm4cnPRdXs4EqexDtlpeMXT9N+xKt6VrExFQq45Npyy+hc2Kc+oFBavsGGFuYR4h8PiMHlpGeVvj+/eDNdoarsJyrihq+lFuO3z8ott4iWmV8sR9ON7YQE1IwZOrwywoHF3YaLGaMw0PcPT7wD0I93NX4GiMhAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Clocks&quot;
        title=&quot;Clocks&quot;
        src=&quot;/static/ad07ff69fd557de1162958d9163ad03b/fcda8/clocks.png&quot;
        srcset=&quot;/static/ad07ff69fd557de1162958d9163ad03b/12f09/clocks.png 148w,
/static/ad07ff69fd557de1162958d9163ad03b/e4a3f/clocks.png 295w,
/static/ad07ff69fd557de1162958d9163ad03b/fcda8/clocks.png 590w,
/static/ad07ff69fd557de1162958d9163ad03b/efc66/clocks.png 885w,
/static/ad07ff69fd557de1162958d9163ad03b/c83ae/clocks.png 1180w,
/static/ad07ff69fd557de1162958d9163ad03b/07e9f/clocks.png 1301w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;While working on the clock face, I determined that I also needed a custom Prop Type for the color values passed to the component. It didn’t make much sense to me for the prop types to allow any string to be accepted when only valid color values will work, so I also made an &lt;a href=&quot;https://github.com/brendon1555/extra-prop-types&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;extra-prop-types&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://www.npmjs.com/package/extra-prop-types&quot;&gt;npm&lt;/a&gt;) library for this with &lt;code class=&quot;language-text&quot;&gt;color&lt;/code&gt; as the first custom prop type.&lt;/p&gt;
&lt;h3 id=&quot;heres-a-quick-snippet-of-the-component-in-use&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#heres-a-quick-snippet-of-the-component-in-use&quot; aria-label=&quot;heres a quick snippet of the component in use permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Heres a quick snippet of the component in use&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;jsx&quot;&gt;&lt;pre class=&quot;language-jsx&quot;&gt;&lt;code class=&quot;language-jsx&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; AnalogueClock &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;react-analogue-clock&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; clockOptions &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;baseColor&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#ffffff&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;borderColor&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;borderWidth&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;centerColor&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;handColors&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;hour&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;minute&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token literal-property property&quot;&gt;second&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;notchColor&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;numbersColor&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;#000000&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;showNumbers&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token literal-property property&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;300&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;AnalogueClock&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token spread&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;...&lt;/span&gt;clockOptions&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Overall this was a pretty fun and useful way for me to start learning Typescript and I plan on adding to and improving both the &lt;code class=&quot;language-text&quot;&gt;react-analogue-clock&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;extra-prop-types&lt;/code&gt; projects into the future.&lt;/p&gt;
&lt;blockquote&gt;
&lt;h2 id=&quot;-check-out-the-live-demo-here-httpsbrendon1555githubioreact-analogue-clock&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#-check-out-the-live-demo-here-httpsbrendon1555githubioreact-analogue-clock&quot; aria-label=&quot; check out the live demo here httpsbrendon1555githubioreact analogue clock permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;👉 Check out the live demo here: &lt;a href=&quot;https://brendon1555.github.io/react-analogue-clock/&quot;&gt;https://brendon1555.github.io/react-analogue-clock/&lt;/a&gt;&lt;/h2&gt;
&lt;/blockquote&gt;</content:encoded></item><item><title><![CDATA[My Github Action for the Linode cli]]></title><description><![CDATA[How to deploy a static site to Netlify with a custom domain for free]]></description><link>https://brendon1555.com/posts/github-action-linode-cli</link><guid isPermaLink="false">https://brendon1555.com/posts/github-action-linode-cli</guid><pubDate>Fri, 06 Mar 2020 09:36:20 GMT</pubDate><content:encoded>&lt;h2 id=&quot;github-hackathon&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#github-hackathon&quot; aria-label=&quot;github hackathon permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;GitHub Hackathon&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/c620870050f65ad2d89c6aca016b541d/github-hackathon.svg&quot; alt=&quot;GitHub Hackathon&quot;&gt;&lt;/p&gt;
&lt;p&gt;Today I entered the &lt;a href=&quot;https://githubhackathon.com/&quot;&gt;Github Actions Hackathon&lt;/a&gt;. What better way to kick off the blog!&lt;/p&gt;
&lt;p&gt;Github is currently hosting a four-week hackathon for the community to submit original GitHub Actions. As a bonus, the first 1,000 submissions receive free &lt;strong&gt;GitHub swag!&lt;/strong&gt; I decided to have a go and made an action to allow access to the Linode cli within a GitHub workflow.&lt;/p&gt;
&lt;p&gt;You can find the project here: &lt;a href=&quot;https://github.com/brendon1555/setup-linode-cli&quot;&gt;https://github.com/brendon1555/setup-linode-cli&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is my first time creating something opensource from scratch. I have previously contributed to a few opensource projects for last year’s Hacktoberfest but nothing too serious. This isn’t all that much either but its a start.&lt;/p&gt;
&lt;p&gt;I look forward to contributing more to opensource where and when I can.&lt;/p&gt;</content:encoded></item></channel></rss>