<?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: MrPowerScripts</title>
    <description>The latest articles on Forem by MrPowerScripts (@mrpowerscripts).</description>
    <link>https://forem.com/mrpowerscripts</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%2F465905%2Fde5297f6-a2ac-49c5-b76b-f8c730ec27e6.png</url>
      <title>Forem: MrPowerScripts</title>
      <link>https://forem.com/mrpowerscripts</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mrpowerscripts"/>
    <language>en</language>
    <item>
      <title>JSON command line tools</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sun, 29 Nov 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/json-command-line-tools-294j</link>
      <guid>https://forem.com/mrpowerscripts/json-command-line-tools-294j</guid>
      <description>&lt;p&gt;So you want to manipulate JSON from the command line? Well, you’re in luck! It’s 2020, and there are several ways to do this. Also, you’re super unlucky. It’s 2020, and the entire world is falling apart. But we can still learn about JSON at the command line!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is JSON
&lt;/h2&gt;

&lt;p&gt;JSON stands for Javascript Object Notation. It has nothing to do with javascript, even though the name makes it sound related. It’s a standard way for formatting data using key-value pairs with various value types. Such as strings, integers, arrays, and objects. JSON has become the defacto format for transmitting structured data between web services. You will likely encounter it when using any web API on the internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why would you use JSON from the command line
&lt;/h2&gt;

&lt;p&gt;JSON is a general-purpose data format. While predominantly used for communication between web services, it has many other use cases. If you’ve ever created a nodejs project, you’ve likely configured your package.json file, which is JSON. Many programming languages like Python and Javascript can parse JSON into native objects of the respective language, but it’s not convenient to write a script to work with JSON all the time. There are times where you may want to curl data from a web service and inspect or manipulate it from the command line. It’s much more convenient this way. Also, maybe you’re writing a bash script where native command-line tools are preferable to calling additional scripts. There are probably many other examples of reasons to work with JSON from the command line - but the biggest question is: What is the best way to do it?&lt;/p&gt;

&lt;h2&gt;
  
  
  How to work with JSON at the command line with Powershell
&lt;/h2&gt;

&lt;p&gt;If you have Powershell installed on Windows or Linux, this is the easiest way to work with JSON at the command line. Powershell has a cmdlet called &lt;code&gt;ConvertFrom-Json&lt;/code&gt; to turn JSON data into a Powershell object, which you can then interact with from the command line like any other Powershell object. Here’s a oneliner to try it yourself &lt;code&gt;$json = Invoke-WebRequest https://reddit.com/.json | select -ExpandProperty content | ConvertFrom-Json&lt;/code&gt;. In this example, we’re downloading the Reddit front page data as JSON, which then converts to a Powershell object and stored in the $json variable. Now you can inspect the data in the variable quickly like this: &lt;code&gt;$json.data.children[0].data&lt;/code&gt;, which will output the first post on the front page.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to work with JSON at the command in Linux
&lt;/h2&gt;

&lt;p&gt;The Linux shell handles data as strings, making it awkward to work with structured data like JSON. All sorts of command-line tools are needed to interact with string data like sed, awk, and cut. But even with these tools, it’s still tricky to efficiently interact with JSON on the Linux shell. A downloadable command called &lt;code&gt;jq&lt;/code&gt; comes to the rescue for working with JSON at Linux’s command line.&lt;/p&gt;

&lt;h2&gt;
  
  
  The jq tool helps you work with JSON data on a Linux command line
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;jq&lt;/code&gt; command is like a function. You give it a JSON input, and based on a string filter, it converts that JSON to the desired output. Let’s look at the same example above but using the Linux command line. &lt;code&gt;json=$(curl -s -L https://reddit.com/.json -H "Accept: application/json" -H "User-Agent: avoid-rate-limit")&lt;/code&gt;. If you &lt;code&gt;echo&lt;/code&gt; the &lt;code&gt;$json&lt;/code&gt; variable, you’ll see a large string output of the JSON data. Scary! How will we get the same post output as easily as we could with the Powershell object? We can do it with a &lt;code&gt;jq&lt;/code&gt; filter that looks very much like the Powershell object’s notation. &lt;code&gt;printf '%s' "$json" | jq '.data.children[0].data'&lt;/code&gt;. Rather than echo the contents to the pipeline, we use `printf ‘%s’ “$json” which will not accidentally interpret any newlines in the JSON because it breaks the structure.&lt;/p&gt;

&lt;p&gt;After running this &lt;code&gt;jq&lt;/code&gt; command, you’ll see the same output as we did when we accessed the Powershell object properties. But it’s important to remember the Powershell example is an actual object which can be combined with other cmdlets to loop through values, perform arithmetic, or anything else we can do with Powershell objects. In &lt;code&gt;jq&lt;/code&gt;, the string filter we provide has incredible flexibility far beyond the simple example.&lt;/p&gt;

&lt;p&gt;For instance, you can use a &lt;code&gt;,&lt;/code&gt; to combine filters within the filter string. Consider this filter &lt;code&gt;printf '%s' "$json" | jq '.data.children[0].data,.data.children[4].data.stickied'&lt;/code&gt;. This will output our original top post value as well as one property from the 5th post. &lt;code&gt;jq&lt;/code&gt; also supports basic arithmetic operators. &lt;code&gt;printf '%s' "$json" | jq '.data.children[4].data.num_comments+1'&lt;/code&gt;. In this example, we’re telling &lt;code&gt;jq&lt;/code&gt; to access a single property and add one to the outputted value. &lt;code&gt;jq&lt;/code&gt; also has built-in functions to help with many tasks. For instance let’s say we want to get all of the keys for a certain object in a list. &lt;code&gt;printf '%s' "$json" | jq '.data.children[4].data | keys'&lt;/code&gt;. Like most shells, you can pipeline values using the &lt;code&gt;|&lt;/code&gt; character. In this example, we’re pipelining the 5th post object to the &lt;code&gt;jq&lt;/code&gt; function called &lt;code&gt;keys&lt;/code&gt;, which will output a list of the object’s keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which tools should you use to work with JSON at the command line
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jq&lt;/code&gt; is an incredible tool for working with JSON data at the command line. While Powershell might be more comfortable, it’s not as readily available as a simple command-line tool, which you can install pretty much anywhere like &lt;code&gt;jq&lt;/code&gt;. Check out the &lt;a href="https://stedolan.github.io/jq/manual"&gt;jq documentation&lt;/a&gt; for all the goodies.&lt;/p&gt;

</description>
      <category>json</category>
      <category>shell</category>
      <category>powershell</category>
      <category>bash</category>
    </item>
    <item>
      <title>Damn it, he was right about 3d printing cars</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sat, 17 Oct 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/damn-it-he-was-right-about-3d-printing-cars-4bo6</link>
      <guid>https://forem.com/mrpowerscripts/damn-it-he-was-right-about-3d-printing-cars-4bo6</guid>
      <description>&lt;p&gt;My very first tech job was working at a local Mom &amp;amp; Pop computer repair and retail shop. And Pop, the owner, was eccentric. He had all kinds of catchphrases he would repeat over the years. “A business without a sign is a sign of no business!”. Is it coincidence that the shop also sold signs?&lt;/p&gt;

&lt;p&gt;“Everything in the store is for sale except the wife.” Indeed, he would regularly sell equipment that colleagues and I relied on to do our jobs. I would show up some days, and monitors would be missing from the tech bench area. To his credit, he always managed to get more equipment in for us to use. And true to his word, Moms managed to survive the daily fire sales. I wouldn’t have be surprised if I came in one day and he traded me to the Indiana Pacers for cash considertions. It was always something with the dude.&lt;/p&gt;

&lt;p&gt;And this guy had so many stories—wild ones. “Back in the day, we developed a driver and almost sold it to HP for a million dollars.” I was young, and it was my first real “office” job, so I didn’t question too much. I was there to learn. But every once in a while we would be alone in the office, and he was a bit different. He liked to put on a show around people, but alone we’d get into deeper stuff. And one day he came back from a client to pick up a large printout of a fancy looking car. I already mentioned the shop made signs right? Well, they were all printed on large format printers. On paper, vinyl, everything. So he’s prepping this huge car poster to take to the client when he says “you know they’re going to print these one day?”&lt;/p&gt;

&lt;p&gt;“print what?”, I replied.&lt;/p&gt;

&lt;p&gt;“The cars. They’re going to print the cars”, he said assuredly.&lt;/p&gt;

&lt;p&gt;“That’s not possible.”, I responded even more assuredly.&lt;/p&gt;

&lt;p&gt;I’m not sure why I took up a stance here, but you have to understand at the time 3D printing was not a thing. At all. Even in basic forms or as a concept. If it was, it was happening in a really fancy lab somewhere. Cue a debate on whether it would ever happen. And despite his best efforts he couldn’t convince me.&lt;/p&gt;

&lt;p&gt;“You see this printer here? It uses ink, but they’ll do the same thing for the car. Build up the car printing layer by layer.”&lt;/p&gt;

&lt;p&gt;I really thought this man lost his god damn mind. For whatever reason I remembered that discussion over the years. And I thought about it a lot more as hobby 3d printers become commonplace. Maybe he was right, and I was wrong? It turns out he had a bit more vision than I did. And it didn’t take that long.&lt;/p&gt;

&lt;p&gt;Almost exactly ten years later &lt;a href="https://www.popularmechanics.com/cars/a16726/local-motors-strati-roadster-test-drive/"&gt;the worlds first “mostly” 3d printed car&lt;/a&gt; was released.&lt;/p&gt;

&lt;p&gt;Damn it. How the hell did he know that? That realization changed me a lot. I was so smugly against the possibility of the idea. Only four years after the first we’re finally seeing prototypes for &lt;a href="https://local12.com/news/around-the-web/german-3d-company-creates-prototype-of-fully-3d-printed-car"&gt;fully 3D printed cars&lt;/a&gt;. This technology isn’t going to slow down.&lt;/p&gt;

&lt;p&gt;What else is out there on the horizon that i’m missing? Where will new and old technologies coverge to create something different that seemed impossible before? I try to stay more open and let my mind wander more these days.&lt;/p&gt;

&lt;p&gt;Weekend trips to Mars? why not. Free energy systems? sure. Communication with other species. of course.&lt;/p&gt;

&lt;p&gt;Nothing great ever happened because a bunch of people got together and decided it’s not possible. So why even start there?&lt;/p&gt;

</description>
      <category>3dprinting</category>
      <category>futurism</category>
      <category>cars</category>
      <category>story</category>
    </item>
    <item>
      <title>Inspiration, motivation, education</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Mon, 28 Sep 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/inspiration-motivation-education-227i</link>
      <guid>https://forem.com/mrpowerscripts/inspiration-motivation-education-227i</guid>
      <description>&lt;p&gt;I don’t talk a whole lot about my personal life because it’s not that amazing. But it’s far better than it started, and that didn’t change overnight. It’s the result of learning from many great people I’ve met over the years. And pushing myself to achieve goals that I would never have thought possible, of course, with many failures along the way.&lt;/p&gt;

&lt;p&gt;The past couple of years have been a whirlwind of achieving goals that have improved my life, and I attribute them to having a better understanding of how to the knowledge I’ve picked up over the years. Little by little. Brick by brick. You can make a stable foundation for yourself, no matter where you started. I’ve found the best place to start is from within yourself.&lt;/p&gt;

&lt;p&gt;I didn’t get here on my own, and I’ve never met a great person who did. Surrounding yourself with great people and learning from them is key to becoming a great person yourself. But knowing what to do isn’t as crucial as actually applying what you know. Many people have access to knowledge without ever attempting to use it. Taking information and turning it into steps that lead you to positive results is a skill, and nobody can do that or you. Okay, I suppose they can. That’s what life coaches do. But not everyone can afford those services.&lt;/p&gt;

&lt;p&gt;However, t’s possible to learn those skills on your own if you’re willing to try and fail until you find what works for you. Meaning, it’s an active process that you have to develop. And anyone can do this with the right mindset. It takes time and effort to develop the mentality for self-improvement. And our past experiences can undoubtedly impact the ease of adapting to the right attitude.&lt;/p&gt;

&lt;p&gt;If I were to describe how dysfunctional my household was growing up, most people would not believe it. And like most rough starts, it didn’t prepare me for my teenage years, when you’re supposed to grow in autonomy and find your path in life. I had some outstanding teachers that helped nudge me in the right direction, but exposure to their efforts was limited to when I was at school. And I didn’t always make the best efforts to show up. It was difficult for me to take the knowledge they shared and find ways to apply it to my life.&lt;/p&gt;

&lt;p&gt;Your behaviors, all of them, build upon each other. Every little thing you do adds up year after year. Are you even thinking about how you invest your time? If not, you should start.&lt;/p&gt;

&lt;p&gt;It wasn’t until I got my foot in the door working in offices with educated people with stable backgrounds where I could pick up the knowledge AND see it applied.&lt;/p&gt;

&lt;p&gt;Before that, I was working jobs like Domino’s pizza, surrounded by many people like myself. People were meandering through life without any intention to improve it. It was like seeing my friends at the time fast forward to their adult lives. There was nothing inspirational about that environment. It was mostly a sad deflating experience. It didn’t take long before I realized I needed to get the fuck out of there.&lt;/p&gt;

&lt;p&gt;But I had no good grades, no real accomplishments to show, no money, no family/friend connections. How was I supposed to get out of this place and surround myself with great people? I was about to turn eighteen when I started to get in a lot of trouble, and I realized I NEEDED to do something. The path I was headed on with the people I was hanging out with only lead me to do bad things that had terrible outcomes. How can I get out of this mess? How can I find myself around people who had the attitudes for success?&lt;/p&gt;

&lt;p&gt;I wanted to work in offices. That’s where all the talented people were, in those tall buildings with big shiny entrances. Full of well-dressed characters carrying their fancy briefcases headed to their nice cars. It seems silly to describe it that way, but I was very much on the outside of that life. I came up with immigrant parents who had tough, blue-collar jobs, and dysfunctional behaviors that prevented them from improving themselves. They had no way to advise me on how to rise out of their troubles as they couldn’t even do it themselves.&lt;/p&gt;

&lt;p&gt;How the fuck was I going to get into one of these places? I had nothing to offer besides a shitty attitude and a poor outlook on life. I had taken a couple of programming classes in school, and I enjoyed trying to fix my computer after all the times I broke it. I liked technology, and that’s the field I wanted to find myself in. How was I supposed to do that from scratch with no one to help me? I walked in the door and asked.&lt;/p&gt;

&lt;p&gt;I searched the internet for every single technology-related office near my house. I spent hours building a list of places with their names and addresses. Remember, this isn’t a time when everything was on the internet. Internet searching wasn’t what it is today. It wasn’t easy, and I think I only managed to find around five to seven suitable options. I printed out multiple copies of my “resume,” which I believe was barely a half-page document. It listed some tech classes I took in high school and my experience making pizzas. I even wore some dress clothes that didn’t quite fit right, the ones I wore to court for all the trouble I found myself in.&lt;/p&gt;

&lt;p&gt;I went to the first place on the list, the one closest to my house. It wasn’t one of the big shiny offices. It was a mom &amp;amp; pop computer repair store that also sold refurbished laptops and computers. A gentleman greeted me moments after walking in the door, to which I asked him if I could speak with the manager. And guess who he happened to be? I explained that I was looking for an internship. I was willing to work for free, and I wanted to learn more about computers. I gave him my resume, which he looked over and asked a couple more questions. “Come in tomorrow after school.”, he told me. And so I did.&lt;/p&gt;

&lt;p&gt;The next day he taught me how to install Windows 98 from scratch on a system with no operating system. I was elated to learn that. I couldn’t wait to go back and learn more. And that knowledge significantly changed my life in the first week. We had an extra broken computer at home, and I could never get it fixed. And I told the manager about it. He let me borrow their Windows 98 CD, and I performed a clean install using the Windows key sticker on the broken computer. IT WORKED, and now I had my very own computer. No more waiting hours for other family members to finish using the sole computer in the house. It happened when those “free” internet services popped up that showed advertisements while you browse. One day with this guy helped me improve my situation at home and enabled me unfettered access to one of the most useful tools on the planet—my very own computer connected to the internet.&lt;/p&gt;

&lt;p&gt;It’s hard to express how life-changing that opportunity was. He and other amazingly talented people who worked there continued to mentor me over the following years. I went from installing software to refurbishing machines. Learning how to diagnose issues and search for solutions on the internet. To building servers, networking systems together. But he didn’t just give me the knowledge. He helped give me the mindset. As the company progressed, it moved into providing on-site technical services.&lt;/p&gt;

&lt;p&gt;I was no longer stuck at the office performing duties. Remember those big fancy offices, with all the well-dressed people and their nice cars? They were now our customers. And I had the opportunity to see what happens on the inside of a lot of these places. I was only there to help, but I had the chance to listen in on discussions with business owners, managers, and workers about all parts of their business. Remember, Information Technology touches every aspect of a business. So as we were designing systems or performing updates, people would have to explain HOW they do everything to implement strategies that supported their processes.&lt;/p&gt;

&lt;p&gt;Every day was an opportunity to be around great successful people and learn how they grew and made their businesses successful. I was able to identify and pick up values that I would never know otherwise. I cherish all of those memories and the opportunities to be around so many great people. I was able to see what it took to be successful. And it took enormous effort to work against the wrongs ways I had learned before.&lt;/p&gt;

&lt;p&gt;I’ll never forget one defining moment when my manager and I had finished installing a brand new complete network rack full of servers I had to build from scratch. It was beautiful. But some of the services weren’t communicating with each other, and we were struggling for some time. I started to get nervous that I screwed something up, and we weren’t going to fix it. There was a lot of money invested in this setup, and they would not be able to run their business the next day unless we got this working. It was a huge client. My manager heard the desperation in my voice, turned to me and said, “MrPowerScripts, it doesn’t matter if we have to re-install all the systems, change out all the hardware, re-cable everything. We will replace everything if we have to, and we will make it work.” And we did make it work. It took a bit longer than expected, but we made it work, and it felt amazing.&lt;/p&gt;

&lt;p&gt;I don’t think he realized it, but that day he planted a seed in me that grew over the years. I learned to develop that attitude further. And we went on to complete many more jobs together. And we both understood that no matter what challenges we face - we will overcome them. And that’s a powerful idea to carry with you.&lt;/p&gt;

&lt;p&gt;I worked incredibly hard from that point on. I had so much ground to cover in changing the way I think and moved through life. He set me on a path to encounter many more great people as I grew and took on more technology jobs. Eventually making it into and working for many of those companies with the big shiny buildings. And this lead to learning many more significant bits of wisdom and recognizing traits and attitudes of success.&lt;/p&gt;

&lt;p&gt;I don’t usually compare myself to other people, but I always try to compare who I am today against who I was yesterday, a week ago, a month ago, a year ago. And despite all my faults, I can say for sure I’ve improved year after year. And I will continue to do so. It doesn’t matter if I have to change all of my habits, change the people around me, change jobs, or anything else. I will do whatever it takes to improve, and I won’t give up.&lt;/p&gt;

&lt;p&gt;And my favorite part of all of this is becoming that person that inspires others to do the same. I didn’t try to do that, but I noticed it when weird things started happening. I remember when I was sharing some thoughts out loud at work many years ago when a colleague I didn’t know that well stopped me mid-sentence to ask - “were you a teacher in the past?” um… no, why? “I think you should be,” he replied. Then more colleagues and friends started reaching out to ME for advice. About work and life.&lt;/p&gt;

&lt;p&gt;The kid who always made all the wrong decisions evolved into the guy many people relied on to make the right ones.&lt;/p&gt;

&lt;p&gt;Woah.&lt;/p&gt;

&lt;p&gt;Am I a perfect person? Fuck no. Far from it. I still have to drag my past with me in many ways. But I’ve become stronger, and I’m able to handle the load better. And I will continue to improve myself and hopefully inspire others to do the same.&lt;/p&gt;

&lt;p&gt;Every day is an opportunity to be a better you. Please don’t waste it. You can do this.&lt;/p&gt;

</description>
      <category>inspiration</category>
      <category>motivation</category>
      <category>education</category>
      <category>technology</category>
    </item>
    <item>
      <title>I fell through my bed the other day</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Tue, 22 Sep 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/i-fell-through-my-bed-the-other-day-4g3j</link>
      <guid>https://forem.com/mrpowerscripts/i-fell-through-my-bed-the-other-day-4g3j</guid>
      <description>&lt;p&gt;I fell THROUGH my fucking bed the other day. It was already a tough day. A Saturday afternoon, that should be time to chill and decompress from a hectic workweek. But no, chores. And I did like every — laundry, cleaning my room, common areas, the fridge, bathroom. I went wild and washed everything. And after all of that, I was exhausted. I didn’t get a lot of sleep the night before, either, which added to the whole lovely exhaustive moment I marinated myself in. I needed to lay down. So I did. And it did not end well, at first.&lt;/p&gt;

&lt;p&gt;I’m a minimalist. My bed isn’t extravagant. It’s simple, easy to move around, and is more comfortable than the floor. Good enough for me. It’s one of those cheap single IKEA beds with the wooden strips that go across the frame. The wood is quite flexible, so it has a nice bounce to it. But over time, the wood starts to bend, and the bed sinks in. it’s not as comfortable anymore, but a new bed isn’t the biggest priority at the moment. The focus at the time was to lay down and enjoy a moment of uninterrupted rest after a long week. I was so exhausted I let myself fall to the bed with a bit more force than usual. As soon as I hit the bed, half the wood planks slipped out from their plastic sockets, which held them in place, and I plummeted to the floor.&lt;/p&gt;

&lt;p&gt;Half my bed is now on the floor below the frame. My legs were hanging over the bed frame like some clothes waiting to dry. And I’m sitting there as if I was kicking back in my favorite La-Z-Boy chair, wondering what exactly I did to deserve this. But I didn’t think about that too long because I just started laughing. After all the work I did, I couldn’t believe all I needed was a bit of support from my bed, and even that gave up on me. Usually, I would get quite upset. It might even ruin my afternoon. But today it didn’t&lt;/p&gt;

&lt;p&gt;I laughed at it.&lt;/p&gt;

&lt;p&gt;I sat there for a bit to enjoy this new view I’ve never had the opportunity to take in before, and then I got up to survey the damage. Thoughts of buying a new bed were swirling my mind, but I wanted to avoid that. I DID NOT NEED MORE STRESS IN THIS MOMENT, BUT LIFE WANTED TO SERVE IT UP TO ME ON THIS DAY. Or did it? When I looked around at the situation’s results, I noticed nothing had broken, which was good. That’s when I saw how bent the wood planks had become, which made it very easy for them to slide out of their plastic sockets.&lt;/p&gt;

&lt;p&gt;Then I had an idea - rotate the bent planks so that the bend protruded up instead of down. It took a bit of work to bend the planks for enough to slide into place, and I was nervous. I thought I was going to break the plastic, but it worked! I put them all into place and got the mattress back on top, which allowed me to enjoy some rest finally—even better rest than I had expected.&lt;/p&gt;

&lt;p&gt;Now that the planks were bending up instead of down, they provided much better support than before. I never even thought to try rotating them, and the fall is what triggered me to have the thought. What I believed to be the worst thing that could happen at the moment became a callout for an opportunity I didn’t even know was right under me all along.&lt;/p&gt;

&lt;p&gt;In times past, I may have gotten furious and threw everything out the window. Okay, maybe not that bad, but It may have bothered me so much I would have missed the new opportunity that was right in front of me. Staying calm and evaluating the situation led to a better outcome than I had expected despite it happening at the worst possible time. I still need a new bed, but I managed to get even better support, better rest, and on top of it, a good laugh.&lt;/p&gt;

</description>
      <category>life</category>
      <category>wisdom</category>
      <category>lessons</category>
      <category>chill</category>
    </item>
    <item>
      <title>Battle Nation Live</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sun, 06 Sep 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/battle-nation-live-31hp</link>
      <guid>https://forem.com/mrpowerscripts/battle-nation-live-31hp</guid>
      <description>&lt;p&gt;Battle Nation Live is a discord variety show bot that I wrote a few years ago. It was the first real discord bot that I built. I was using Discord.js, and the code is atrocious. But it still works! And I’ve set it up to run on the MrPowerScripts discord server so that people can try it out any time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Battle Nation Live Overview
&lt;/h2&gt;

&lt;p&gt;You can get the quickest overview of how it works by checking out &lt;a href="https://bnl.mrpowerscripts.com/"&gt;https://bnl.mrpowerscripts.com/&lt;/a&gt;, the original website.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Battle Nation Live work
&lt;/h2&gt;

&lt;p&gt;So how does the bot work? Join “The Show” voice channel and then run the&lt;code&gt;!signup&lt;/code&gt; command, which adds you to the queue for the show. Once it is your turn, you will automatically get the “Live” discord role, which allows you to use the mic.&lt;/p&gt;

&lt;p&gt;Everyone else remains muted, and it’s your turn to shine! Except there’s one catch. Everyone else gets to vote on whether you get to keep the mic or not using emoji during the performance. If you lose the vote at the end of the round, it goes to the next person! Rounds last 15 seconds, so you need to keep everyone entertained if you want to keep the mic.&lt;/p&gt;

&lt;p&gt;And this whole process of users signing up, changing the role of who can use the mic, rotating people through the queue., and doing the emoji vote counts are managed by the bot. It’s pretty neat. I like to think of it as American Idol for discord, or some other singing or variety contest. Americas Got Talent for discord? I don’t know I never really watched those shows. But it’s possible to have these kinds of contests on discord as well!&lt;/p&gt;

&lt;h2&gt;
  
  
  Battle Nation Live source code
&lt;/h2&gt;

&lt;p&gt;The code is super terrible. I was learning a lot of stuff about node and js at the time, as I still am. But I’m going to share it anyway. &lt;a href="https://github.com/MrPowerScripts/battle-nation-live-discord-bot"&gt;https://github.com/MrPowerScripts/battle-nation-live-discord-bot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you want to test your skills, joins the MrPowerScripts Discord server (&lt;a href="https://bit.ly/mrps-discord"&gt;https://bit.ly/mrps-discord&lt;/a&gt;) where the bot is running 24/7. You can always hop on the mic at the Battle Nation Live show. lol I should never be allowed to name things.&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>Why the name MrPowerScripts?</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sat, 15 Aug 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/why-the-name-mrpowerscripts-13ja</link>
      <guid>https://forem.com/mrpowerscripts/why-the-name-mrpowerscripts-13ja</guid>
      <description>&lt;p&gt;So why did I choose to name all of this…. stuff, MrPowerScripts? The youtube channel, the blog, the podcast. Everything is MrPowerscripts. The reality is that I fucked up, and I haven’t been a massive fan of it for a long time. I lacked the foresight to see that it would grow into more… stuff. I had to pick something unless I wanted some long-ass garbled string as my youtube URL. Subscribe to my channel youtube.com/sdfJIOfdsafhHJdshafo yeah, okay. But the fact it was a video platform had a considerable influence on why I chose this name instead of something cool like Tech Warriors, or Scriptiverse. Hmmm, I guess It could have been a lot worse. I shouldn’t be allowed to name anything. But it was inspired by someone else who made educational videos.&lt;/p&gt;

&lt;h2&gt;
  
  
  The. internet is amazing
&lt;/h2&gt;

&lt;p&gt;See, there was this time before the internet. It was fucking terrible. I lived years of my life without access to all the world’s knowledge. If you wanted to know some weird facts about a random building in Italy, you had to read it in a book, know someone from Italy, or go to Italy. Which is all fine and dandy unless you’re a fucking five-year-old. Or however old I was. Do you know what it’s like looking through an encyclopedia as a child? They’re thick and wordy. Are you a visual learner? Get fucked kiddo. There were no random youtube videos by vacationers with six views about some obscure building in the middle fuck all nowhere, Italy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Encyclopedia bricktanica
&lt;/h2&gt;

&lt;p&gt;And that’s if you were lucky enough to have an encyclopedia set full of random info. Look up how much those big encyclopedia sets used to cost. Hell, they’re still like $800 on Amazon. They would sell them on TV at odd hours, and you would have to pay with installments of $19.99 a month for the rest of your damn life. I’m not even exaggerating &lt;a href="https://slate.com/technology/2012/03/the-encyclopedia-britannica-was-expensive-useless-and-exploitative-im-glad-its-gone.html"&gt;people on major publications have written happily about the demise of one of the major brands of the day Encyclopedia Britanica&lt;/a&gt;. TL;DR Massive paperweights, and not as cool as Mr. cool dude in their advertisements leads us to think.&lt;/p&gt;

&lt;p&gt;Okay, okay, the world’s knowledge wasn’t just within those overpriced organic bricks, but wow, I hated those things. I needed a moment for some retro-hate. I was so excited to find an article bashing them! There is something far far better that served as a crucial role in information exchange. Libraries!&lt;/p&gt;

&lt;h2&gt;
  
  
  I loved the library
&lt;/h2&gt;

&lt;p&gt;The library was AMAZING, and an endless supply of information was available. They were always changing as new books came and went. I have the best memories of hanging out at libraries. I would spend hours poking through books looking for the ones I wanted to read late into the night. I sometimes left with my backpack full.&lt;/p&gt;

&lt;p&gt;If I was lucky, I could find excellent illustrations in books about really complicated stuff that I wanted to learn. And being more of a visual learner, understanding advanced or sophisticated ideas through reading was a challenge. Reading comprehension is a fundamental skill, and thankfully I had access to an infinite number of books to keep me curious and challenged at a young age. But my brain is probably a bit broken because I found television programs with graphics and animations accelerated my understanding of the subject matter much faster. Books I love you, but sometimes video is better. A picture can be worth a thousand words and good luck fitting a thousand words into a concise paragraph with neat transitions and sound effects. Maybe I just like powerpoints?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Rise of the Science Giants
&lt;/h2&gt;

&lt;p&gt;Educational science programs made the “hard” stuff seem more straightforward and did so in an entertaining way. Television shows I grew up with like “Bill Nye the Science Guy” and” Beakmans World” exploded in popularity during the ’90s. They were so popular we had days in school where we watched episodes to give students an overview of subjects before covering them more in-depth using the book materials. Video-based education was a booming segment in visual media throughout the decade, growing along with the internet. And these faces happened to pop up in the right place at the right now. But there was someone making science education videos waaaaay before Bill and Beakman brought their quirky personalities to the TV screens. Someone who was pretty much the complete opposite of them. Mr. Wizard&lt;/p&gt;

&lt;h2&gt;
  
  
  Mr. Wizard doesn’t have time for your shit, kid
&lt;/h2&gt;

&lt;p&gt;Mr. Wizard had two science educations shows. One from 1951-1965 (71-72) in black &amp;amp; white called “Watch Mr. Wizard.” And he later returned to TV with a second show called “Mr. Wizards World” that ran from 1983-1990. Very original name, Mr. Beakman. Mr. Wizard was there teaching simple science concepts on TV with real examples that you could watch while having someone talk through the explanation with you. Like you had a personal teacher that you could pause and rewind. I remember watching the show in passing at a very young age. I didn’t know how scheduled worked at the time. I don’t even think there was a TV channel for schedules at the time. You had to buy a TV guide at the grocery store. I realize now kids are going to have no fucking clue what any of that means, and I’m starting to realize just how barbaric the ’90s were.&lt;/p&gt;

&lt;h2&gt;
  
  
  Play with fire, and you’re gonna get learned
&lt;/h2&gt;

&lt;p&gt;Anyway, It would happen to be on TV sometimes, and I was lucky to catch it playing. And the thing I loved most about it is that I clearly remember understanding that this stuff was REAL. You could mix things and make them explode! He was always lighting things on fire, and I generally found that to be incredibly cool at the time. I was not the brightest lightbulb. He regularly taught us that the materials in the world we live in interact with each other in neat ways, and we have tools and techniques to detect and measure it all. Well, not all of it. Still a whole lot of “hmm, that’s fucky” when it comes to the sciences. But through the persistence of experimentation and iteration, we discover new things that make us go “hmm, that’s fucky”. And then sometimes, penicillin, because “whoops.” The world is magical.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mr Wizard helped make MrPowerScripts
&lt;/h2&gt;

&lt;p&gt;So as I was trying to figure out a name for this new youtube channel that I needed to name, I thought of the first video educator that I encountered. Someone I’ll never meet, but who had a significant impact in sparking my curiosity about the world and sharing it in a fun, simple, and engaging way in a time where access to information was limited compared to today. The channel was only going to be about Powershell scripts at the time, and so MrPowerScripts became the channel name.&lt;/p&gt;

&lt;p&gt;I always remembered him as a bit of a hard-nosed teacher, and it was funny to find the video below of Mr. Wizard being a jerk while trying to help kids learn. That… explains a lot now that I think about it.&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>Working from home is overrated and you need to know why</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sat, 01 Aug 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/working-from-home-is-overrated-and-you-need-to-know-why-4een</link>
      <guid>https://forem.com/mrpowerscripts/working-from-home-is-overrated-and-you-need-to-know-why-4een</guid>
      <description>&lt;p&gt;It’s trendy because of the global pandemic, but people have likely learned by now that working from home isn’t so great. Having worked from home for seven-ish years now, I feel very comfortable saying that. And it’s not only because I’m not wearing pants as I write this. It’s also because I’m laying in bed, with my heated lumbar support. I’m very comfortable saying all of this. So let me tell you why working from home isn’t so great!&lt;/p&gt;

&lt;p&gt;First, I always have trouble deciding when I want to get up. “Be there at 8 am sharp,” was my mental mantra for almost a decade. Then I started working from home, and I have a window from 8 am to 11 am when I need to get started. I didn’t have to think about it too much before. It was so simple. Sometimes I’m up all night trying to decide when I want to get up. What am I supposed to do with so much freedom?&lt;/p&gt;

&lt;p&gt;The freedom it offers can be exhausting. Sometimes I’ll wake up early, by accident, and I don’t want to start working yet. But I need to do SOMETHING. So I’ll go to the kitchen to make some delicious eggs and bacon, but find no eggs! And this happens all too often because I have the time to prepare well made delightful food every morning, and the eggs go so fast! I’ll have to endure a morning walk to the local store with cars lined up for blocks honking erratically. How inconvenient is that? I always prefer to have my walks after a nice lunch when everything in the streets is calm and the afternoon sun is shining. They don’t warn you about these complications that a work from home job can create. I mean, it has destroyed some of my favorite activities.&lt;/p&gt;

&lt;p&gt;I used to do laundry ALL THE TIME. I had my closet bursting with casual business attire. You know, the kind of attire that lets other people know you’re a decent human being. With slight style variations, to also let people know you’re not a mindless cog working within a culturally suffocating environment that values conformity for streamlined behavior that maximizes profit. But now I don’t have any of that!!! Who will see my pencil tie to know I like writing? I no longer have a second set of clothing geared towards my office persona, and it dramatically reduced the time I spend washing clothes, hanging them to dry, and folding them. Alright, alright, I’ll admit this was a bit of a joke cause don’t fold my clothes. But now my opportunities to not do it are far fewer! It’s devastating and only adds to the time I spend worrying about what to do with all the time I have!&lt;/p&gt;

&lt;p&gt;All those stresses got to me when I started working remotely. I was beginning to lose it, and now I take breaks regularly. Almost every hour I’ll go on a mini walk, or take the time to stretch, make a delicious snack, or something else to keep me occupied through these daily dramas I’m encountering now. But it gets even worse than that!! These inconveniences follow me everywhere I go.&lt;/p&gt;

&lt;p&gt;I tried to escape these troubles by going to local cafes with good wifi, prepared dishes, and no digital loitering policy. No longer would I have to worry about food running out, distractions from home, or anything else perturbing my well-being through work. Or, so I thought! Do you know how hard it can be on you when your favorite barista isn’t working, and the new person filling in doesn’t know how to add cocoa flakes around the milky heart shape on the top of your coffee? And you have to sit there trying to get work done taking sips, but you don’t get that extra chocolately bit of flavor and texture in each sip? It’s devastating. I’ve had to scour my hours to find super baristas. And I call in each morning now to make sure AT LEAST one of them is working before I waste ten minutes walking over there.&lt;/p&gt;

&lt;p&gt;Nobody is telling the truth about this stuff. You hear about how fantastic working from home is, but until you’ve spent time living the lifestyle, it’s easy to overlook the less obvious pitfalls. But thankfully, I’m here to tell you the truth about working from home, so you don’t have to trouble yourself looking for one of these jobs and flooding the market with competition.&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>My code is in the GitHub Arctic Code Vault</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Fri, 17 Jul 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/my-code-is-in-the-github-arctic-code-vault-2poe</link>
      <guid>https://forem.com/mrpowerscripts/my-code-is-in-the-github-arctic-code-vault-2poe</guid>
      <description>&lt;p&gt;I opened up GitHub the other day to find I had a new badge called Artic Code Vault Contributor. Excuse me? Wat? Some of you might be thinking, “of course! The Artic Code Vault”. But I had no fucking clue what that meant in the slightest. So I did what most people do when they’re trying to shake the dumb from their brain. I Googled, “What is the Artic Code Vault?”. And this is what I saw.&lt;/p&gt;

&lt;p&gt;Wow. My code is literally chilling inside an island called Svalbard, housed deep in an old mine to be preserved for the future of humanity. If that doesn’t sound like some wild James Bond shit, I don’t know what does, but it doesn’t matter MY CODE IS IN A FREAKING ARTIC CODE VAULT IN THE ARTIC IN A VAULT THAT”S SUPER COLD HOW COOL IS THAT?&lt;/p&gt;

&lt;p&gt;Below freezing. I couldn’t find any specific information about the Arctic Code Vault’s temperature, but it’s probably safe to say it’s below freezing. And that’s pretty fucking cool. So what code is stored in the Artic Code Vault? &lt;a href="https://github.com/MrPowerScripts/reddit-karma-farming-bot"&gt;The Reddit Karma Farming Bot&lt;/a&gt;, The &lt;a href="https://github.com/MrPowerScripts/meme-cd"&gt;Continuous Meme Delivery Project&lt;/a&gt;, and my &lt;a href="https://github.com/MrPowerScripts/storage"&gt;generic script storage&lt;/a&gt; repo. None of that was worth preserving for future generations of humans. Unless future generations will need to spam Reddit with puppy pictures for fake internet points. Okay, maybe at least that one was worth saving. KARMA.&lt;/p&gt;

&lt;p&gt;What an amazing feat of human achievement, and I’m super happy to be part of this plan put forth because we’re probably going to fuck this planet up so bad it’s gonna cause a fun evolutionary reset. Hopefully, chicken people get a shot at dominating the world next. Working on open-source software with some odd wing-friendly keyboards, and the Artic Code Vault will definitely give them a head start.&lt;/p&gt;

&lt;p&gt;We can all agree that this is a monumental feat of human achievement of preserving technological advancements and culture. Just like the Svalbard Global Seed Vault which is not far from the GitHub Arctic Code Vault. All of these endeavors are 5 stars, right? Uhhhh then why does the Svalbard Global Seed Vault have a 4.6 rating on Google Maps? HOW IS THIS NOT 6 STARS??? You can look at it right on the map embedded below.&lt;/p&gt;

&lt;p&gt;WHO COULD POSSIBLY THINK THIS IS NOT AMAZING?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9TbCI0fi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9TbCI0fi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-1.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mxAfG8Bi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mxAfG8Bi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-2.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KYTWQuLH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KYTWQuLH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-3.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oVo9k06O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oVo9k06O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-4.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xuzRoNmB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xuzRoNmB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-5.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xn0hsvHP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xn0hsvHP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-6.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BuP8zCe_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BuP8zCe_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/code-vault-review-7.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You know what? Fuck it. Do the elites have a Patreon I can support to speed this all up?&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>MrPowerScripts.com is a Progressive Web App (PWA)</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sat, 13 Jun 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/mrpowerscripts-com-is-a-progressive-web-app-pwa-1ec0</link>
      <guid>https://forem.com/mrpowerscripts/mrpowerscripts-com-is-a-progressive-web-app-pwa-1ec0</guid>
      <description>&lt;p&gt;I finally did it. MrPowerScripts.com is now a Progressive Web App. Did it take long? Nope. A couple of hours. I was trying to do it from memory. It should have taken about 20 minutes. Whoops. So it’s there, it’s working, it’s incredible, and what the hell is a PWA?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a progressive web app? (PWA)
&lt;/h2&gt;

&lt;p&gt;You ever surf a website, and you like the content? And you would love to get notifications about when new content is released? Or the ability to interact with the site offline? So you check to see if they have an app, and if you’re lucky, they do! Cause that’s all the stuff that apps do.&lt;/p&gt;

&lt;p&gt;But why do you need to download an entirely new app? The content was right there already. Native apps do provide additional advantages. They have access to local resources, processes can run in the background. You can’t do all that with a website.&lt;/p&gt;

&lt;p&gt;But the content was RIGHT THERE ALREADY. Why do I have to open up a different app to download a new app to get a better experience with the content I was literally just looking at?&lt;/p&gt;

&lt;p&gt;What if you could get the benefits of a native app directly from the website itself? So users click a button on your website that turns the site into a native app type of experience. That’s what a Progressive Web App does.&lt;/p&gt;

&lt;p&gt;PWA support comes directly from browsers, so they work on both mobile and desktop. Progressive web apps turn your website into a native app-like experience on mobile, and they can also be installed as a “desktop app.” on your computer. Not every browser supports this feature. For instance, Chrome fully supports Progressive Web Apps on mobile and desktop versions. Firefox mobile has some support for PWAs, but they’ve had a &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1407202"&gt;three-year-old open issue&lt;/a&gt; for adding support in their desktop version.&lt;/p&gt;

&lt;p&gt;You can see which browsers support the required &lt;a href="https://caniuse.com/#search=PWA"&gt;features for PWAs here&lt;/a&gt;. The interesting part is that the Microsoft Edge browser has full support for PWAs. In contrast, Apple’s Safari browser has no support. Why is that interesting? If you read about the &lt;a href="https://en.wikipedia.org/wiki/Progressive_web_application"&gt;history of PWAs&lt;/a&gt; they were conceptualized as the first “app” experience on the iPhone. Though they faded out of favor for the “native” solution, we’re now using. iPhone apps were supposed to be web apps build with basic HTML, CSS, and javascript through AJAX calls. Despite dragging along through the years, there’s a wide range of growing use and support for PWAs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the advantages of a PWA vs. Native app
&lt;/h2&gt;

&lt;p&gt;Native apps will always perform better, but many types of websites can benefit from adding PWA support. Such as content-focused sites, like news outlets. Adding PWA support will let users add your “web app” to their mobile home screen or desktop shortcuts for quick access. It also allows your website to open up as a full screen. So to the user, it will have an app-like experience. They can access it with the click of a button, and they’ll have the full phone real estate to view the content like a native app.&lt;/p&gt;

&lt;p&gt;Also, through the use of a service worker, you can enable various caching strategies, so that content can be cached for offline viewing. Or the content can even be updated in the background. Allowing for the new content to open quickly. New standards like Trusted Web Activity (TWA) and tools like &lt;a href="https://mrpowerscripts.com/pwa-to-apk-with-twa/"&gt;Bubblewrap by Google Chrome Labs team&lt;/a&gt; enable you to quickly turn your PWA website into an APK. Then you can upload your PWA APK to the Google Play store, where people can download it like a real native app. Also, like native apps, you’ll be able to send mobile and desktop notifications. Again, like a real native app!&lt;/p&gt;

&lt;p&gt;Hopefully, we’ll see more support for Progressive Web Apps, as they help bridge the gap between native and web experiences. With the use of good old fashioned Javascript, HTML, and CSS. Native apps will always have their place because of the performance and resource limitations of PWAs. But you still have access to a lot of great features like notifications, and offline viewing. Also, PWAs can be installed from desktop browsers with a simple click. Can you install a play store app on your desktop that easily? Probably not.&lt;/p&gt;

&lt;h2&gt;
  
  
  PWAs are here to stay
&lt;/h2&gt;

&lt;p&gt;PWAs aren’t going to go away any time soon, and the support is only growing. Many major websites like Twitter, Facebook, and popular open-source projects like Discourse already support PWAs. Exciting tools like Bubblewrap will help increase the versatility of PWAs. And we’ll likely continue to see standards like TWA develop to blur the lines between the native app and PWA experience.&lt;/p&gt;

&lt;p&gt;Need help turning your website into a PWA? Join me &lt;a href="https://bit.ly/mrps-discord."&gt;on Discord&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>Simple tips for great tutorial videos</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Tue, 09 Jun 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/simple-tips-for-great-tutorial-videos-36b</link>
      <guid>https://forem.com/mrpowerscripts/simple-tips-for-great-tutorial-videos-36b</guid>
      <description>&lt;p&gt;So I’ve had my youtube channel for over eight years now. Am I a “YouTuber”? Not really. The channel is pretty small, and I don’t post content as often as I used to. Have I improved in those eight years? You’re damn right, and that’s what I really love most about the channel. My hard work is on display. I figured it was a good time to critique my first video and share some of the things I learned about creating tutorial videos on youtube.&amp;lt;!-- (1) video wrapper --&amp;gt;&lt;/p&gt;

&lt;p&gt;When I created my first video, I didn’t really know anything about video editing, recording audio, performing format conversions, how youtube worked. Basically, I didn’t know anything. I scrambled enough information together through the internet to put together a simple tutorial that shared a Powershell cheat sheet that I used. Not very groundbreaking, but I had to start somewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned making tutorial videos
&lt;/h2&gt;

&lt;p&gt;Here’s a quick list of tips that will help you create great tutorial videos. Obviously, I have my own sort of approach with making tutorial videos. I like to focus on showing code, or simple images that may help illustrate a point. Everyone has their own style, and everyone has style preferences. So, if your style is different than mine these suggestions may not be helpful, but maybe they’ll help you consider some ideas you haven’t thought of already.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Good audio is critical and poor sound is distracting. You want your voice to be clear and consistent throughout the video and without random background noises that detracts from the experience. It’s worth investing in all the new mid-range condenser mics available these days. It will make a huge difference. Also, learning how to apply filters like condensers and noise limiters can drastically improve the performance of even lower range audio devices.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your voice is audio. How you talk matters. Speak clearly, and project your voice. It may seem weird projecting your voice in an empty room, but that extra kick can improve the video experience. If you sound excited and interested in the content, it will appear more exciting and interesting. This can take a lot of practice, but the results are worth it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Make it mobile-friendly. Mobile media consumption far surpasses desktop consumption. If what your showing can’t be viewed through mobile, then you’re leaving a lot of potential viewers out. Increase font sizes, zoom in with browsers. Whatever you need to do to make the content your showing clear on mobile should be done.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do favors with your editing. You can save people a lot of time with your editing. I’ve been able to cut a full five minutes out of videos that were just filled with pauses and “umms” that distracted from the experience and wasted time. People are watching your tutorial so they can do something, and the faster you can give them the information they need, the faster they can get back to doing that thing. Nobody has ever complained about weird cuts or the mouse jumpting around because I removed a couple seconds of the video in editing. .But I’ve received a lot of praise for how clean and concise my videos are since I began improving my editing process. A bit of extra time editing can save tons of time for viewers through the life of the video.&lt;/p&gt;

&lt;p&gt;I’ll keep adding to this list as I remember more details I’ve found helpful over the years. It’s essential to go back and critique our own works if we want to continue improving. Am I the best video creator on the planet? Not even close. But the time spent on this hobby has helped me in many ways. Every new video I created was an opportunity to analyze my own efforts and established a new baseline for me to improve upon. And the proof is there. It took me eight years to go from bad to OK, and I’m sure I’ll learn about more I can improve upon in the next eight years.&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>Feng Shui Bracelet - The greatest youtube commercial ever</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Mon, 01 Jun 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/feng-shui-bracelet-the-greatest-youtube-commercial-ever-64f</link>
      <guid>https://forem.com/mrpowerscripts/feng-shui-bracelet-the-greatest-youtube-commercial-ever-64f</guid>
      <description>&lt;p&gt;Do you want to learn more about Feng Shui and how to use it to shake $20 from people’s pockets? Well, I have the deal of a lifetime for you. Reading this blog post is going to unlock real wealth and happiness in your life. Not that fake knock of wealth and happiness. So let’s learn more about Feng Shui and how you can attain everything you’ve ever wanted.&lt;/p&gt;

&lt;h2&gt;
  
  
  This youtube commercial is going to change your life
&lt;/h2&gt;

&lt;p&gt;I came across this life-changing commercial while trying to watch something else. I forget what it was, but it wasn’t going to change my life like this commercial did. The ad starts off with a man asking me if I’ve heard about Feng Shui and how it can affect my energy flow. I have, but the exhilarating background music makes me feel like I’m about to learn more than I could imagine. Noel here seems pretty confident he’s about to change my life. Let’s do this, Noel. Lay some Feng Shui game down on me.&lt;/p&gt;

&lt;h1&gt;
  
  
  Keep your eye on the bar
&lt;/h1&gt;

&lt;p&gt;Thankfully this Feng Shui commercial included a flashing bar above narration text displayed on the screen. My eyes kept wandering, but the bar helped keep me focused on the explanatory captions. It also included helpful choices for words and phrases highlighted in yellow that really emphasized the positive aspects of Feng Shui. But don’t let it totally distract you from the beautiful, relevant b-rolls.&lt;/p&gt;

&lt;h1&gt;
  
  
  Free Feng Shui home office tips
&lt;/h1&gt;

&lt;p&gt;The video, released Nov 3, 2019, lets us know that Feng Shui originated in China. Then two months later, the coronavirus, which also came from China, spread to the world. Having people trapped at home would make them more likely to see these Feng Shui adverts and be susceptible to messages of increasing wealth and prosperity. Am I saying this company deliberately spread coronavirus so people will care more about Feng Shui? Yes, it’s entirely possible given how 2020 has played out so far. It would be the least surprising thing at this point. But can you really be mad at them? They’re about to give away Feng Shui tips FOR FREE. We’re getting a great deal here, people. So here are your 5 free Feng Shui home office tips.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Always sit so there is a solid wall behind your back. This ensures that you have support in your life. Never sit with your back towards the window.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Always place fax machines, telephone, computers, and cash registers in the southeast wealth sector to attract more prospective businesses.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Arrange your desk so you always have a clear view of the door, preferably facing the door. If it is impossible to arrange, then hang a small mirror so you can clearly see the reflection of the door.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Never put a shelf over your desk. The shelf symbolizes the burdens of the world coming down upon you.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Try to keep sharp items such as paper cutters, scissors, or any sharp corners of a machine away from the desk. Make sure they are not pointing at the desk. Keep all the sharp objects hidden away from view in a drawer or closet. The sharp edges symbolize the cutting of a knife, which is a disapproving finger pointing at you.&lt;/p&gt;

&lt;p&gt;AMAZING. Five free Feng Shui tips for your home office. You’re probably thinking all that sounds like a load of horse shit, but that’s exactly what someone with an empty southeast wealth sector would think. Loser. I even sawed off all the corners of my desk to be extra safe. But what can we do outside of our home office? I need to take this magical energy with me EVERYWHERE I go. Is it possible? Can it be? You’re damn right it’s possible, and the advertisement doesn’t waste time to jump right into the alternatives, like the Feng Shui Black Obsidian Bracelet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feng Shui Black Obsidian Bracelet
&lt;/h2&gt;

&lt;p&gt;Holy shit, you can literally carry Feng Shui around on your wrist with the Feng Shui Black Obsidian Bracelet. The bracelet is made of two POWERFUL talismans. First, the Pixiu talisman, which is also known as Pi Yao. The other element is black Obsidian. Wait, that’s not two talismans. You just called it an element, where is the other talisman? WHO CARES let’s go over some benefits of Pixiu and black Obsidian.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attract fortune and wealth with Pixiu talisman
&lt;/h2&gt;

&lt;p&gt;The video tells us Pixiu is known to bring fortune and attract wealth. I mean those are kinda the same thing, right? I’m not sure why you said the same thing in two different ways, but I like the sound of both of them. This is a combo deal talisman. Incredible two for one talisman value. Then there’s the black Obsidian, which is known to give protection and shield against negativity. Which is so important in this day and age where haters are everywhere. Like haters in the video youtube comments who bought the bracelet and found it didn’t do anything at all.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QvFlwae_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/feng-shui-comments.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QvFlwae_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mrpowerscripts.com/images/feng-shui-comments.jpg" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Block out your haters
&lt;/h2&gt;

&lt;p&gt;This negative energy needs to be blocked out, and thankfully the bracelet has that critical Obsidian element. The video also goes on to state that Black Obsidian is known to increase self-control and makes one embrace their true self. Which might be why those people bought this bracelet in the first place, they simply didn’t have the self-control they needed. And now, with this bracelet, they definitely won’t make any further impulsive decisions. Truly amazing.&lt;/p&gt;

&lt;p&gt;But the most amazing part of all this is that Noel discovered the bracelet when he met Master Xi. See, Noel was a garbage collector before Master Xi put him onto the Feng Shui Black Obsidian bracelet. Noel found a wallet on the ground with more money than he could earn. Did that wallet have more money than he could make in a day? A week? A year? WE DON’T KNOW AND WHO CARES. Stop asking so many questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Master Xi is a really dope name, to be honest
&lt;/h2&gt;

&lt;p&gt;What’s important here is that Noel was honest and gave the wallet back to the owner, who happened to be Master Xi. That’s when Master Xi rewarded Noel by giving him the Feng Shui Black Obsidian bracelet. Immediately from here on out, Noel’s life totally changed. And even many other people told Noel that the bracelet changed their life too. It also healed their illness. What illness? Again, WHO CARES, this thing is covered in gold and Obsidian. Keep your eye on the blinking bar and read the text. This isn’t a Q&amp;amp;A session. Noel is here to teach you how to cure whatever the fuck you got. It even provided more work opportunities for some and generally made people feel more confident.&lt;/p&gt;

&lt;p&gt;I don’t know if you’ve realized yet, but this bracelet is fucking amazing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Einstein would totally wear the Feng Shui bracelet
&lt;/h2&gt;

&lt;p&gt;Still skeptical? Noel goes on to implore you to recognize the importance of the energy in and around us. He quotes Einstein’s famous equation E = mc&lt;sup&gt;2&lt;/sup&gt; to remind us that matter is tightly related to energy. Energy shapes matter, so if we can shape our energy, we can begin to shape our future. That’s right, the bracelet is backed up by SCIENCE. Einstein said it himself. You gonna sit there with your broke ass calling Einstein stupid? Why shape your energy with a healthy diet and exercise when all you really need is to carry around some Feng Shui on your wrist?&lt;/p&gt;

&lt;p&gt;Noel isn’t a lowly garbage collector anymore. Now he works closely with Master Xi to bring these bracelets to the world. Which may sound like he got roped into a multi-level marketing scheme if you’re the type of hater that keeps pointy things on their desk. Thankfully the Obsidian blocks out all that hater energy.&lt;/p&gt;

&lt;h2&gt;
  
  
  I feel richer simply by looking at the bracelet
&lt;/h2&gt;

&lt;p&gt;At this point, we reach the end of the video, and all you have to do is click the link and wait for your Feng Shui black Obsidian bracelet. What a fantastic journey of transformation we were able to make in three minutes and thirty-eight seconds. For only $20 you, and everyone else, can have access to all the wealth, health, and prosperity you dreamed of.&lt;/p&gt;

</description>
      <category>mrpowerscripts</category>
    </item>
    <item>
      <title>Oh My Gosh turn your PWA into an Android app in the Google play store</title>
      <dc:creator>MrPowerScripts</dc:creator>
      <pubDate>Sun, 26 Apr 2020 00:00:00 +0000</pubDate>
      <link>https://forem.com/mrpowerscripts/oh-my-gosh-turn-your-pwa-into-an-android-app-in-the-google-play-store-hfi</link>
      <guid>https://forem.com/mrpowerscripts/oh-my-gosh-turn-your-pwa-into-an-android-app-in-the-google-play-store-hfi</guid>
      <description>&lt;p&gt;Do you have a &lt;a href="https://en.wikipedia.org/wiki/Progressive_web_application"&gt;Progressive Web App (PWA)&lt;/a&gt; that you would love to see in Google’s Android play store? You can make that happen today! With &lt;a href="https://github.com/GoogleChromeLabs/bubblewrap"&gt;bubblewrap from GoogleChromeLabs&lt;/a&gt;. It is an experimental tool that &lt;a href="https://github.com/GoogleChromeLabs/bubblewrap/tree/master/packages/cli"&gt;uses a CLI&lt;/a&gt; to process your PWA and generate an apk you can upload to the play store. Let’s look at how I did it for one of my sites. Now, mrpowerscripts.com isn’t a PWA… yet. But I have many other flat Jekyll sites that are progressive web apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Progressive Web apps look like native apps
&lt;/h2&gt;

&lt;p&gt;You install a progressive web app through browsers like Chome. Not every browser supports PWAs yet, but support is growing. For instance, Firefox Mobile supports them, but Firefox Desktop, as of this date, does not. All you need to do to turn your website into a progressive web app is to add a manifest file with the details of your PWA and a service worker. Here is an example of my manifest.json file, which lives in the root of my site.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "ThisIsMySiteOrPWAName",
  "short_name": "ThisIsShorter",
  "theme_color": "#39a4cd",
  "background_color": "#fff",
  "prefer_related_applications": false,
  "display": "standalone",
  "Scope": "/",
  "start_url": "/?utm_source=a2hs",
  "icons": [
    {
      "src": "assets/img/favicon/manifest-icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "assets/img/favicon/manifest-icon-512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

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



&lt;p&gt;Browsers will see this file and know that it should treat your site as a progressive web app. You also need to configure a service worker, which allows your PWA to have cool capabilities. Like offline viewing with caching, and push notifications. You know, like a native app! But this isn’t a howto on setting up a PWA. I’m assuming you already have one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bubblewrap CLI
&lt;/h2&gt;

&lt;p&gt;Once you have a site that is working as a PWA, you can start using &lt;a href="https://github.com/GoogleChromeLabs/bubblewrap/tree/master/packages/cli"&gt;the bubblewrap CLI&lt;/a&gt;. Now, this may feel a bit overwhelming but stay with me here. Here are the commands you need to run to turn the PWA into an APK. &lt;code&gt;bubblewrap init --manifest https://example.com/manifest.json&lt;/code&gt; and &lt;code&gt;bubblewrap build&lt;/code&gt;. That’s it? That’s it. The bubblewrap CLI tool pulls in your PWA manifest file information and uses it to initialize the project. It might be a good idea to use the &lt;code&gt;--directory=&lt;/code&gt; on the init as well, so it keeps everything in a folder for you. Then you can turn that folder into a git repo and track the changes. The &lt;code&gt;bubblewrap build&lt;/code&gt; command takes the initialized project and uses it to build an Android APK. From there, you can treat it as a standard Android APK file. Like uploading it to the play store.&lt;/p&gt;

&lt;p&gt;Now, if you went to look at the repo, you’ll notice that there is a bit of setup because of dependencies. But it seems like this is a relatively new project that has a lot of ongoing work, so I think the dependencies will be managed better in the future. The great thing is that it works now! If you have any issues setting it up pop into &lt;a href="https://bit.ly/mrps-discord"&gt;Discord&lt;/a&gt; and get help.&lt;/p&gt;

&lt;h2&gt;
  
  
  This works thanks to Trusted Web Activity
&lt;/h2&gt;

&lt;p&gt;Trusted web activity is an open way to verify trusted web content within an Android app. So, anything that is being opened by the mobile Chrome browser within an app. Sometimes you’ll see native apps can load web content in a browser. It’s still chrome, but apps use this feature of &lt;a href="https://developers.google.com/web/android/custom-tabs/implementation-guide"&gt;Chrome Browser called Custom Tabs&lt;/a&gt;. This lets app developers make their apps open content in a browser without having to build a mobile browser themselves. It’s very convenient, and our generated APK file basically opens our PWA right into a Chrome Custom Tab instance. Then TWA tells the browser that the content is from the same developer as the app. How does the browser know that the website it’s opening is a TWA? It does this by creating a Digital Asset Links file, which like the manifest file, is accessible from your website. It would live here: &lt;code&gt;https://example.com/.well-known/assetlinks.json&lt;/code&gt; Here’s an example &lt;code&gt;assetlinks.json&lt;/code&gt; from &lt;a href="https://developers.google.com/web/android/trusted-web-activity/quick-start#creating-your-asset-link-file"&gt;Google’s TWA Quickstart guide&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.appspot.pwa_directory",
    "sha256_cert_fingerprints": [
      "FA:2A:03:CB:38:9C:F3:BE:28:E3:CA:7F:DA:2E:FA:4F:4A:96:F3:BC:45:2C:08:A2:16:A1:5D:FD:AB:46:BC:9D",
      "4F:FF:49:FF:C6:1A:22:E3:BB:6F:E6:E1:E6:5B:40:17:55:C0:A9:F9:02:D9:BF:28:38:0B:AE:A7:46:A0:61:8C"

    ]
  }
}]

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



&lt;p&gt;I created that file through a tool in their quickstart guide called &lt;code&gt;Peter's Asset Link Tool&lt;/code&gt;. You can &lt;a href="https://play.google.com/store/apps/details?id=dev.conn.assetlinkstool&amp;amp;hl=en"&gt;download Peter’s Asset Link Tool&lt;/a&gt; from the Play store. After publishing a Beta version of the app to the play store and downloading it, I was able to use that tool to generate the &lt;code&gt;assetlinks.json&lt;/code&gt; file and add it to my site. So when the generated APK opens my PWA using Chrome, it knows that I made the app because of the fingerprint on my website. My content is therefor trusted and granted special abilities like being full screen in the custom tab. Otherwise, you would see the chrome toolbar at the top. Similar to when you see other native apps open a custom tab browser. So it’s a website disguised as a PWA disguised as a native app. It’s pretty cool!&lt;/p&gt;

&lt;p&gt;PWA’s brought a lot of power to websites on native devices, and TWA with fancy new tools is further blurring the line between web and native applications. In this case, I only need one code base and my responsive site works on Desktop, tablets, mobile devices, Play store, and many more interfaces thanks to simple web conventions.&lt;/p&gt;

&lt;p&gt;Try it out!&lt;/p&gt;

</description>
      <category>apps</category>
      <category>android</category>
      <category>pwa</category>
      <category>google</category>
    </item>
  </channel>
</rss>
