<?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: Tim Bhison</title>
    <description>The latest articles on Forem by Tim Bhison (@bhison).</description>
    <link>https://forem.com/bhison</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%2F127619%2F9e512a42-92b2-459b-92c1-eab2b3aa8a07.jpeg</url>
      <title>Forem: Tim Bhison</title>
      <link>https://forem.com/bhison</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bhison"/>
    <language>en</language>
    <item>
      <title>Two Ways To Get Synergy Out Of An iMac + Macbook Combo</title>
      <dc:creator>Tim Bhison</dc:creator>
      <pubDate>Fri, 11 Jan 2019 16:47:01 +0000</pubDate>
      <link>https://forem.com/bhison/two-ways-to-get-synergy-out-of-an-imac--macbook-combo-1f02</link>
      <guid>https://forem.com/bhison/two-ways-to-get-synergy-out-of-an-imac--macbook-combo-1f02</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_DsOpT5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/eq5bwewmlr2vsedfgdgv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_DsOpT5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/eq5bwewmlr2vsedfgdgv.JPG" alt="That burrito is my pencilcase, but that's another story"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's start with the elephant in the room - an iMac plus a Macbook is decadent, over the top and somewhat unnecessary, I agree! I think the intention was for me to use the iMac in the studio and the laptop everywhere else, but I kind of got tired of reinstalling whatever latest package I'm using on my iMac once I come back from an evening's hack session. Either way, I have these devices through whatever means and actually, after some time, I kind of like them as a set up.&lt;/p&gt;

&lt;p&gt;The question I asked myself upon being given these to work with was - where's the famed Apple interoperability? Surely requiring something mobile and something powerful is a classic mix? Actually, there's very little to reward someone for regularly using two different Macs. I dream of the day of MacOS roaming profiles - not just your desktop being mirrored between devices (which kind of works with iCloud), but all your applications and your application settings and all your files, sites, themes... So whilst there's some way to go in reaching Apple's own standard of magical user experience, you can, depending on your precise models, do the following&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Use your iMac as an external monitor with Target Display Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Compatible with late 2009 - mid 2014 iMacs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, I had this massive screen on a machine I didn't have much use for, and a tiny screen on a machine I used all of the time. Also, I'd seen my brother use his iMac to play Xbox on a few years back so I knew something along these lines was possible. I was delighted to see that the iMac I had been passed custody of was old enough to be included within the compatibility list. For some reason, retina iMacs do not have Target Display Mode as an option. I read somewhere this was because there was an issue scaling up lower resolution outputs. Unfortunately, it's just another example of Apple slowly peeling away interesting uses of their products.&lt;/p&gt;

&lt;p&gt;But you're lucky and have a compatible device! So how do we do it? First, you need a mini displayport cable. And &lt;em&gt;no&lt;/em&gt; I don't mean a thunderbolt cable and &lt;em&gt;yes&lt;/em&gt; I spent a lot of time trying to get this to work before I realised these might look the same but are functionally different for some reason. Shove this cable in to your iMac's display port and your Macbook's display port and hit &lt;code&gt;Cmd + F2&lt;/code&gt; on your iMac. &lt;/p&gt;

&lt;p&gt;Note, newer devices can use their thunderbolt ports for display whereas older devices have dedicated ports with a little screen symbol. Also note, this also works with things other than Macbooks - if you have an HDMI to mini displayport adapter you can use your iMac like a TV with audio and everything. If you have any issues, view &lt;a href="https://support.apple.com/en-us/HT204592"&gt;more details here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Use your iMac as a Time Machine server
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Doesn't&lt;/em&gt; work on El Capitan, &lt;em&gt;does&lt;/em&gt; work on High Sierra, &lt;em&gt;might&lt;/em&gt; work on Sierra I haven't checked!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On to the other comparable difference between the two machines - one sits on my studio desk all of the time, the other sits in my bag, sits on my dinner table and is generally out in the wild a lot more. My iMac is safe whilst my Macbook is not. Thankfully, there's a way to leverage this. By setting your Macbook to backup wirelessly to your iMac whenever they're on the same network you know you'll have all your files safely stored should you pass out drunk on a train and get robbed again.&lt;/p&gt;

&lt;p&gt;To set this up is relatively straight forwards once you know it's a possibility. It just requires setting up your iMac so it can be used as a Time Machine target &lt;a href="https://support.apple.com/en-gb/HT202784#mac"&gt;[article]&lt;/a&gt; and then selecting that machine as your target when setting up Time Machine &lt;a href="https://support.apple.com/en-gb/HT201250"&gt;[article]&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;In reality, the speed at which data transfers wirelessly will mean it takes quite a while to do the initial backup, so I used an ethernet cable for this. Thankfully the way Time Machine works is kind of like git, in that it tracks actual changes and doesn't store a whole disk image for each backup. This is actually the first time I've used Time Machine seriously and I have to say I'm impressed. And it feels good to finally be properly backing up everything I do on a daily basis.&lt;/p&gt;

&lt;p&gt;Have any issues setting either of these up? Or do you have any other clever ways to use this overpriced, luxury combo? Let me know in the comments.&lt;/p&gt;

</description>
      <category>mac</category>
      <category>hardware</category>
      <category>battlestations</category>
    </item>
    <item>
      <title>Viewing WebPack On Mobile</title>
      <dc:creator>Tim Bhison</dc:creator>
      <pubDate>Fri, 11 Jan 2019 15:18:00 +0000</pubDate>
      <link>https://forem.com/bhison/viewing-webpack-on-mobile-2gjm</link>
      <guid>https://forem.com/bhison/viewing-webpack-on-mobile-2gjm</guid>
      <description>&lt;p&gt;So, hello world, or hello DEV - I wanted an excuse to make my first post on here, so I'm just going to quickly explain my latest little joy in development from this morning. I hope it can be of use to someone!&lt;/p&gt;

&lt;p&gt;I've been using &lt;a href="https://www.npmjs.com/package/webpack"&gt;WebPack&lt;/a&gt; with a fair amount of success over the last month or so, to the point where I don't really think about it all that much any more, it just works. If you've yet to find success with WebPack, I highly recommend &lt;a href="https://www.youtube.com/watch?v=GU-2T7k9NfI&amp;amp;list=PL55RiY5tL51rcCnrOrZixuOsZhAHHy6os"&gt;this YouTube series on it from Academind&lt;/a&gt; which taught me everything I needed, with a little help from the comments section (yes, sometimes it's actually useful rather than infuriating)&lt;/p&gt;

&lt;p&gt;If you do already use WebPack, then chances are you also use it's buddy, &lt;a href="https://www.npmjs.com/package/webpack-dev-server"&gt;Webpack-Dev-Server&lt;/a&gt;, which operates like an always-on build and lets you see live changes in your source files as if they had been built. This has been working fantastically for me so far, however I've only been developing with desktop in mind until yesterday where I was asked to make sure everything works on mobile.&lt;/p&gt;

&lt;p&gt;I had a little experience with this kind of thing in the past - I've made nodemon and express expose files on LAN. As it turns out, you can do the exact same thing here. Some googling lead me to &lt;a href="https://github.com/webpack/webpack-dev-server/issues/147"&gt;this closed issue on the WebPack-Dev-Server GitHub repository&lt;/a&gt; which divulged the required magic spell to be input into your command line or package.json start script...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;webpack-dev-server &lt;span class="nt"&gt;--port&lt;/span&gt; 8080 &lt;span class="nt"&gt;--hot&lt;/span&gt; &lt;span class="nt"&gt;--host&lt;/span&gt; 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By setting the IP to 0.0.0.0 you are targeting your machine and revealing your server to the local network. You can then view your site via any device on your local network by navigating to your computer's local IP (howto: &lt;a href="https://www.techwalla.com/articles/how-to-find-a-lan-ip"&gt;windows&lt;/a&gt;/&lt;a href="http://osxdaily.com/2010/08/08/lan-ip-address-mac/"&gt;mac&lt;/a&gt;) followed by &lt;code&gt;:8080&lt;/code&gt; or whatever you chose to set the port to above. In my case it was &lt;code&gt;http://192.168.1.51:8080&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You'll also notice the &lt;code&gt;--hot&lt;/code&gt; option being used above. This means that as you make updates on your machine, it will trigger a refresh on the device you're monitoring from - or at least that's what it's supposed to do in theory, I found it was a bit patchy meaning I have to either restart the server or tap refresh on my iPad like a peasant.&lt;/p&gt;

&lt;p&gt;Let me know if you have any other webpack related tips, I'm new to this and am really interested to hear of any other cool features I might not yet have explored.&lt;/p&gt;

</description>
      <category>webpack</category>
      <category>webpackdevserver</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
