<?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>DEV Community: jeffrainey</title>
    <description>The latest articles on DEV Community by jeffrainey (@jeffrainey).</description>
    <link>https://dev.to/jeffrainey</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%2F420766%2Fa522935d-b32d-4508-bc37-326fd49358b4.jpeg</url>
      <title>DEV Community: jeffrainey</title>
      <link>https://dev.to/jeffrainey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeffrainey"/>
    <language>en</language>
    <item>
      <title>Web Development on a 13″ MacBook Pro M1</title>
      <dc:creator>jeffrainey</dc:creator>
      <pubDate>Mon, 15 Feb 2021 21:53:20 +0000</pubDate>
      <link>https://dev.to/jeffrainey/web-development-on-a-13-macbook-pro-m1-24bd</link>
      <guid>https://dev.to/jeffrainey/web-development-on-a-13-macbook-pro-m1-24bd</guid>
      <description>&lt;p&gt;Last week was super busy and I was cranking late, testing a project that would be rolling out for release the next morning. I made some final adjustments before putting an old friend to sleep for the last time. My 2015 15″ MacBook Pro had served me well for years but when trying to awaken it the next day I got the flashing folder of doom.&lt;/p&gt;

&lt;p&gt;I tried many things to bring the machine back to life including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reset the NVRAM&lt;/li&gt;
&lt;li&gt;Reset the SMC&lt;/li&gt;
&lt;li&gt;Startup in recovery mode&lt;/li&gt;
&lt;li&gt;Startup in diagnostics mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything was pointing to SSD failure. I had another SSD since I had upgraded mine a few years ago and even that one wouldn’t work. Recovery mode was not showing the drive at all. After losing half a day of a work it was beginning to look as if the issue is connectivity to the drive. It could be as complex as the logic board or maybe the issue is someplace else… I gave into the fact this was not going to be resolved quickly and decided I needed a new machine and fast. My old 2015 was heading for retirement before this but I was holding out for the 16″ MacBook Pro M1 or whatever M chip it will have. I like a larger machine, screen and was leery about having only 8GB of RAM on board. But, beggars can’t be choosers so I snagged the last one from my local Best Buy. I also needed to get up and running quickly, so downloading my image from Backblaze was not really an option. So, I opted to get the HDD version of my data and restore as I go. That should be here later this week.&lt;/p&gt;

&lt;h2&gt;
  
  
  FIRST IMPRESSIONS
&lt;/h2&gt;

&lt;p&gt;Out of the box this thing looks and feels great. It weighs much less than my 2015 model and is much thinner. Yes, it is smaller but still the weight very noticeable. The 13″ MacBook Pro is also really snappy compared to my old 2015 model, another plus. I have mixed feelings about the Touch Bar. On one hand having emojis available while typing is kind of nice. I have also seen a few more decent uses of this but overall, I just kinda want my buttons back. The touch pad to unlock is kinda cool but nothing beats unlocking with my watch. However, passwords to sites and ApplePay with my finger is pretty nice. And, speaking of touch, the trackpad is HUGE. I was really concerned that I would be accidentally touching it all of the time, but it doesn’t seem to happen that often.&lt;/p&gt;

&lt;h2&gt;
  
  
  THE RAM
&lt;/h2&gt;

&lt;p&gt;8GB of RAM… This was a huge downer and the thing I worried most about. I was constantly hitting the ceiling on my old machine with 16GB. To my surprise, these machines do more with less RAM and I have not had trouble with this yet. I am not quite sure how this is possible but it just seems to find a way.&lt;/p&gt;

&lt;h2&gt;
  
  
  BATTERY LIFE
&lt;/h2&gt;

&lt;p&gt;Everything you have heard is true. The battery life is insane. I left work on Friday and worked on the machine over the weekend several times for maybe 4-5 total hours and the battery is still 3/4 full. For my old machine I had 2 cords, one for work and one for home. Initially I thought I would need a second cord for this Mac M1, but I really don’t think that is necessary. My monitor at work accepts USB C as an input so I may never even use the power supply that came with the machine. For now, it just stays in my laptop bag.&lt;/p&gt;

&lt;h2&gt;
  
  
  WEB DEVELOPMENT ON A MAC M1
&lt;/h2&gt;

&lt;p&gt;Another major concern I had was how well this machine would do with web dev tools. I remember the move to Intel and parts of that did not go smoothly.&lt;/p&gt;

&lt;h3&gt;
  
  
  First up, Git
&lt;/h3&gt;

&lt;p&gt;I didn’t have any projects load up yet and out of habit I ran to my development directory to get started.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rainey.dev/web-development-on-a-13-macbook-pro-m1/"&gt;Continue Reading...&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Lint for Target _blank, noopener and noreferrer</title>
      <dc:creator>jeffrainey</dc:creator>
      <pubDate>Wed, 20 Jan 2021 18:09:56 +0000</pubDate>
      <link>https://dev.to/jeffrainey/css-lint-for-target-blank-noopener-and-noreferrer-1254</link>
      <guid>https://dev.to/jeffrainey/css-lint-for-target-blank-noopener-and-noreferrer-1254</guid>
      <description>&lt;p&gt;If you have been developing websites for some time, you may know that adding a target of _blank to a link can have some unintended consequences. I sometimes find myself wondering which of these to add and and having to look them up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;&lt;br&gt;
Use &lt;strong&gt;rel="noreferrer noopener"&lt;/strong&gt; at minimum. There is also a &lt;strong&gt;nofollow&lt;/strong&gt; that you may want to use but this has less to do with security and more about passing “link juice” along to the site that you are linking to. When you do not use &lt;strong&gt;nofollow&lt;/strong&gt; you are basically vouching for the site that you link to and this can also affect your SEO. So, just make sure to use &lt;strong&gt;nofollow&lt;/strong&gt; when linking to sites that may not be as reputable.&lt;/p&gt;

&lt;h2&gt;
  
  
  WHY ARE WE DOING THIS?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The threat associated is called Reverse Tabnabbing. The issue is the webpage that we are linking our existing page to gains a partial access to the linking page, or in other words, the target page or url gains a partial access to our parent page from where the user is redirected to a new url.&lt;/p&gt;

&lt;p&gt;This happens through the window.opener object of Javascript. The attacker can change the window.opener.location to some malicious page and also the parent page. In case the parent page has the same look and feel of the user intended page, he might end up sharing credentials or secure information assuming that the webpage is secure.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hackernoon – &lt;a href="https://hackernoon.com/unsafe-use-of-target_blank-39413ycf"&gt;https://hackernoon.com/unsafe-use-of-target_blank-39413ycf&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  WARNING MYSELF AND OTHERS WHEN WE FORGET…
&lt;/h2&gt;

&lt;p&gt;WordPress does a pretty good job with adding these in the editor and I can add a linting rule for my own code. But, sometimes there are places where code or content can be added by site admins or editors in places where this may not get caught. To help find these, I am playing with the idea of this CSS linting rule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rainey.dev/target-_blank-noopener-noreferrer-and-nofollow/"&gt;Read More About CSS Lint for _blank targets&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>security</category>
      <category>html</category>
    </item>
    <item>
      <title>Git Stash, Retrieving Items That Are Not the Most Recent</title>
      <dc:creator>jeffrainey</dc:creator>
      <pubDate>Tue, 29 Dec 2020 12:47:12 +0000</pubDate>
      <link>https://dev.to/jeffrainey/git-stash-retrieving-items-that-are-not-the-most-recent-k5l</link>
      <guid>https://dev.to/jeffrainey/git-stash-retrieving-items-that-are-not-the-most-recent-k5l</guid>
      <description>&lt;p&gt;Some Git commands like stash show are used regularly but not enough to keep top of mind. These are some commands I often find myself Googling for. If you are new to Git, checkout this post, &lt;a href="https://rainey.dev/git-101/"&gt;Git 101&lt;/a&gt; for the basics.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Stash?
&lt;/h2&gt;

&lt;p&gt;Stashing work is a great way to set things aside for a moment. For example, I am working on a feature but a customer support request comes in that I want to see locally. No problem.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git stash&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now I can safely switch to master and see what is going on. When I am ready to jump back to my work:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git stash apply&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git stash pop&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I typically use the first one since the last not only gives me the last stash item, but also removes it from the stash history.&lt;/p&gt;

&lt;h2&gt;
  
  
  What if I want an older stash, not the most recent one?
&lt;/h2&gt;

&lt;p&gt;This comes up for me occasionally and is one I find myself Googling for specific options. In this case:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git stash list&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This brings up a nice list of your previous stashes if you haven't been popping them. They will look something like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  stash@{0}: WIP on branch-name: (last commit hash and message here)&lt;/li&gt;
&lt;li&gt;  stash@{1}: WIP on branch-name: (last commit hash and message here)&lt;/li&gt;
&lt;li&gt;  etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is fairly helpful but it doesn't really show what files I was working on...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rainey.dev/git-stash-retrieving-items-that-are-not-the-most-recent/"&gt;Read On&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
    </item>
  </channel>
</rss>
