<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: howbotnik</title>
    <description>The latest articles on Forem by howbotnik (@howbotnik).</description>
    <link>https://forem.com/howbotnik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F184597%2Fe5e53e68-af06-40f0-91c9-42f6c8e18f0b.png</url>
      <title>Forem: howbotnik</title>
      <link>https://forem.com/howbotnik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/howbotnik"/>
    <language>en</language>
    <item>
      <title>Create Simple &amp; Good Looking Buttons</title>
      <dc:creator>howbotnik</dc:creator>
      <pubDate>Wed, 19 Feb 2020 08:46:02 +0000</pubDate>
      <link>https://forem.com/howbotnik/create-simple-good-looking-buttons-83k</link>
      <guid>https://forem.com/howbotnik/create-simple-good-looking-buttons-83k</guid>
      <description>&lt;h1&gt;
  
  
  Use Google's Material Icons and CSS to Create Good Looking Buttons
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A0D9pI4D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.ibb.co/0cJ9D4m/button-activate.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A0D9pI4D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.ibb.co/0cJ9D4m/button-activate.gif" alt="Buttons being activated"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would you rather not read this article and go straight to the JSFiddle? &lt;a href="https://jsfiddle.net/howbotnik/287065rw/1/"&gt;Click here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's get started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creating the button
&lt;/h3&gt;

&lt;p&gt;We're going to start by creating a standard button in our html document.&lt;/p&gt;

&lt;p&gt;Unfortunately, that means that it will come with it's own &lt;em&gt;style&lt;/em&gt; and appear with sharp edges, grey colour and harsh borders.  We want our button to be a bit more eye-catching than that so the first step is...&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove the default style in CSS:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;border: none;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;outline: none;&lt;/code&gt;&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Adding our own style:
&lt;/h3&gt;

&lt;p&gt;I like my buttons to have a transparent background so that the text or icon contained within them stands out.  Buttons also look cool with rounded off edges and a hover effect to highlight your interactions:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;height: 35px;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;width: 35px;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;border-radius: 15px;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;background-color: transparent;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;color: white;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Also, adding a hover effect class:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.circle-button:hover {&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;background-color: yellow;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
    &lt;code&gt;color: orange;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, we now have a fully styled button that looks the business. Wouldn't it be great if there was a collection of icons that we could use to insert an appropriate image into our button instead of some boring text?&lt;/p&gt;

&lt;p&gt;There is...&lt;/p&gt;
&lt;h2&gt;
  
  
  Adding Google's Material Icons
&lt;/h2&gt;

&lt;p&gt;Google have kindly made their icons available to everybody through the use of their html header link.  Here are just some of the icons available:&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JE6QaBaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/KDJKGjg/icons.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JE6QaBaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/KDJKGjg/icons.jpg" alt="Icons"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All you have to do is include it in your HTML document header like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/icon?family=Material+Icons"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Applying it to our button
&lt;/h3&gt;

&lt;p&gt;All we have to do is include the icon inside our button in the HTML document like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"circle-button centre-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;i&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"material-icons"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"font-size:25px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;cloud&lt;span class="nt"&gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Which results in buttons like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vO9z0c3u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/fC1NCBv/click.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vO9z0c3u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/fC1NCBv/click.jpg" alt="Icon buttons"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The text we place inside the &lt;em&gt;icon tag&lt;/em&gt; tells the Google API which icon we want.  To explore Google's available icons &lt;a href="https://material.io/resources/icons/?style=baseline/"&gt;click here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Everything discussed in this article is available in the JSFiddle example code available here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://jsfiddle.net/howbotnik/287065rw/1/"&gt;https://jsfiddle.net/howbotnik/287065rw/1/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>button</category>
      <category>icons</category>
    </item>
    <item>
      <title>Home Network NAS for Cheap</title>
      <dc:creator>howbotnik</dc:creator>
      <pubDate>Sun, 12 Jan 2020 08:15:09 +0000</pubDate>
      <link>https://forem.com/howbotnik/home-network-nas-for-cheap-241b</link>
      <guid>https://forem.com/howbotnik/home-network-nas-for-cheap-241b</guid>
      <description>&lt;h1&gt;
  
  
  What I did to save money on NAS storage
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;My home network is slowly growing and I have had a cheap DLink 2 bay NAS drive for the last few years.  The Network Attached Storage has served its purpose for the things I have needed and supports Time Machine backups, media server, and file storage solutions.&lt;/p&gt;

&lt;p&gt;I was starting to out-grow the 2-bay drive after wanting to backup the backups of year's worth of files with the ever growing collection of photos and documents. I also found that large transfers were taking far too long and hovering around the ~30mbps range. So I did some shopping around...&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;A lot of NAS drives are aimed at workplaces and were way out of the price range of my budget so I looked for other solutions and here's what I did.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Purchased a 4 bay USB 3.0 external drive enclosure&lt;/li&gt;
&lt;li&gt;Filled the enclosure with my old drives (plus one new!)&lt;/li&gt;
&lt;li&gt;Installed Ubuntu on an old dual core laptop&lt;/li&gt;
&lt;li&gt;Formatted the drives to ext4 (for better performance)&lt;/li&gt;
&lt;li&gt;Installed a samba server and configured it to share my drives&lt;/li&gt;
&lt;li&gt;Installed an AFP server for Apple Time Machine&lt;/li&gt;
&lt;li&gt;Installed Plex Media Server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Outcome
&lt;/h2&gt;

&lt;p&gt;The old laptop had a very early USB-C port so I managed to get a Gigabit Ethernet adapter to improve transer speeds.  Overall, I am very pleased with the outcome. I feel like I have achieved transfer speed and storage space that will keep me satisfied well into the future all for about a 5th of the cost of the commercially available NAS drives.  I am currently getting ~115mbps transfer rates and I believe this is due to the restrictions in disk speed.&lt;/p&gt;

&lt;p&gt;Are you interested in mining using solar power? &lt;a href="https://dev.to/howbotnik/solar-powered-mining-executer-5g5p"&gt;Read this&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nas</category>
      <category>network</category>
      <category>disk</category>
      <category>drives</category>
    </item>
    <item>
      <title>Leaving IOS for Android</title>
      <dc:creator>howbotnik</dc:creator>
      <pubDate>Thu, 02 Jan 2020 06:26:21 +0000</pubDate>
      <link>https://forem.com/howbotnik/leaving-ios-for-android-2g19</link>
      <guid>https://forem.com/howbotnik/leaving-ios-for-android-2g19</guid>
      <description>&lt;h1&gt;
  
  
  I made a decision to leave IOS
&lt;/h1&gt;

&lt;p&gt;I have spent the last 10 years in a love/hate relationship with Apple. I’ve given them a lot of my hard earned cash through iPhones, macs and various accessories but I’ve made the decision to leave the iPhone behind.&lt;/p&gt;

&lt;p&gt;I really like Apple products in the way that they are designed exceptionally well and everything &lt;em&gt;just works&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Recently though, I’ve not wanted to upgrade my iPhone 7 for the last 4 years because none of their latest products excite me. But also I feel like I am locked in or held prisoner by Apple. I’ve invested so heavily in their infrastructure that I can’t step outside for fear of losing out.&lt;/p&gt;

&lt;p&gt;Little things over the years have become annoyances like the way Apple treats its customers, the way they fail to adopt standards like USB-C, or the way their stuff just doesn’t play well with other devices.&lt;/p&gt;

&lt;p&gt;I am quite stubborn and made a similar decision over 5 years ago when I closed my Facebook account. The external pressure begging me to stay part of the club ends up pushing me away further. So, when I’ve made my decision that’s it.&lt;/p&gt;

&lt;p&gt;I ordered a Google Pixel 4 XL yesterday and have taken the biggest tech leap in my phone ownership. I’m excited in a way that waiting for the latest Apple phone never made me.&lt;/p&gt;

&lt;p&gt;Change is good right?&lt;/p&gt;

</description>
      <category>iphone</category>
      <category>android</category>
      <category>mobile</category>
      <category>pixel</category>
    </item>
    <item>
      <title>Mining When the Sun is Out</title>
      <dc:creator>howbotnik</dc:creator>
      <pubDate>Wed, 01 Jan 2020 12:13:51 +0000</pubDate>
      <link>https://forem.com/howbotnik/solar-powered-mining-executer-5g5p</link>
      <guid>https://forem.com/howbotnik/solar-powered-mining-executer-5g5p</guid>
      <description>&lt;h2&gt;
  
  
  Beginning
&lt;/h2&gt;

&lt;p&gt;For my first post I will introduce you to a piece of software I have been working on for the past few weeks.&lt;/p&gt;

&lt;p&gt;Since getting into mining (in a purely recreational way) I have been trying to come up with a way to automate my miner.  I live in a house with solar panels on the roof but no way to store the electricity generated.  So I have been trying to solve the problem of turning on my mining software only when the weather is acceptable, therefore, generating your choice of cryptocurrency from free electricity!&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;I started with the idea that my software needed to follow these requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check to see if the sun is up&lt;/li&gt;
&lt;li&gt;Check to see if the weather is acceptable&lt;/li&gt;
&lt;li&gt;Start or stop the miner depending on the conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Project
&lt;/h2&gt;

&lt;p&gt;Head over to &lt;a href="https://github.com/howbotnik/sunmine"&gt;https://github.com/howbotnik/sunmine&lt;/a&gt; to grab a copy and see how this could run on your system.&lt;/p&gt;

&lt;p&gt;The config file needs building first and the project runs using Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Location]
# for local weather information
country_code = GB
location = London

# for the sunrise / sunset api
latitude = 51.5074
longitude = 0.1278

[Tokens]
open_weather = **OpenweatherAPIKey**

[Communication]
# Emails user when turning mining on or off
recipient_email = test@test.com
sender_email = test@test.com
password = password

smtp_server_address = smtp.gmail.com
smtp_port = 587

[Miner]
# read the documentation for best practice
program_location = **path to your executable miner**

[Weather_types]
weather_codes=["800","801","802"]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This config file makes a lot of the program customisable and the program is set up to email when the miner switches on and off.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Weather_types&lt;/code&gt; section allows the user to adjust the types of weather that are acceptable for mining using the &lt;a href="https://openweathermap.org"&gt;https://openweathermap.org&lt;/a&gt; weather codes.&lt;/p&gt;

&lt;p&gt;As for scheduling, I have had this running successfully as a &lt;em&gt;Scheduled Task&lt;/em&gt; on Windows and you can also run it as a &lt;em&gt;cron&lt;/em&gt; task on Linux systems.&lt;/p&gt;

&lt;p&gt;Do you have a use for this? Have you found any problems with the code? Could you suggest any further improvement?&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Uses
&lt;/h2&gt;

&lt;p&gt;This program could be used to initiate any program and is not only limited to mining.  Certain home-automation processes may only need to run during sunny periods.  The rest is up to you!&lt;/p&gt;

</description>
      <category>python</category>
      <category>solar</category>
      <category>mining</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
