How can I update NPM to the next version?

How do I update npm?

npm install -g npm

Please note that this command will remove your current version of npm. Make sure to use sudo npm install -g npm if on a Mac.

You can also update all outdated local packages by doing npm update without any arguments, or global packages by doing npm update -g.

Occasionally, the version of npm will progress such that the current version cannot be properly installed with the version that you have installed already. (Consider, if there is ever a bug in the update command.) In those cases, you can do this:

curl https://www.npmjs.com/install.sh | sh

WampServer Error: ( ! ) Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

You’re using WampServer and you may of recently moved your local host website files into OneDrive.

You now receive the error:

( ! ) Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

( ! ) Fatal error: Unknown: Failed opening required ‘D:/OneDrive/WAMP/WWW/site/index.php’ (include_path=’.;C:\php\pear’) in Unknown on line 0

The problem is probably caused by your local WampServer’s PHP being unable to work with OneDrive.

The solution is to upgrade the version of PHP for your WampServer.

To do this, visit http://wampserver.aviatechno.net/ and download a more recent version of PHP, from from 7.2.25 onwards. Once the .exe downloads, open it, and follow the prompts.

You may be prompted that your version of WampServer is not compatible with the PHP upgrage package.

The solution to this is to download a newer version of WampServer through an upgrade package. Download Wampserver update 3.2.0, run the file, then run the PHP updater.

If, when you go to start WampServer again, you receive an error about a missing images_on.bmp file, simply duplicate c:\wamp\images_off.bmp into c:\wamp\images_on.bmp, and try again.

How to make a Divi full width slider full height also

If you’re using Elegant Theme’s Divi, and you have a full width slider at the top of your page you wish to extend down to the bottom of the view port, at first add a css class name to< that particular slider module, say: my_slider.

After that add the following css code into custom css of your theme’s Divi theme options

.my_slider.et_pb_slider .et_pb_slide {
height: calc(100vh - 80px) ;
}

The above CSS takes into account a header height (which contains the logo and navigation) of 80px.

How to find the original source of an image you find on the Internet

Scenario: you see a digital image on Facebook, it might be a great photo, or a digital print of a great piece of artwork you love. You want to find out more about this image.

Solution: use Google reverse image lookup.

  1. If you’re in Facebook, click the image to open it in full view.
  2. Once you see the image in full view, right-click on it, and choose open Open image in new tab. This opens the image from its source. It might look something like: https://scontent.fper1-1.fna.fbcdn.net/v/t1.0-9/13925419_10153997905159285_7833260870309389435_n.jpg?oh=c3f43ce743df9568aa040a613aa24875&oe=5849B3EC, which is:
    horse art
  3. Copy the URL. You will need to click in your browser’s address bar, highlight the www.something.com/something-else-etc, right-click on this, and choose copy
    copy url
  4. Go to https://images.google.com, or search for Google Images.
  5. Once you’re at Google Images, click on the search by image button:
    search by image
  6. Paste the image URL into the Paste Image URL box, by right-clicking inside this field and choosing Paste, then click Search by Image
  7. You will then see a list of URLs where this image has been used.
  8. With luck, you will find a result that gives credit to the original author of the image.
  9. If you click on Visually similar images, you will see search results where you can choose Search Tools, then select Large images:
    large image size

Finish

Recommended WordPress Plugins

For Website Owners

  1. Yoast SEOSearch Engine Optimization
  2. BackupWordpressAutomated file and database Backups
  3. WordfenceSecurity
  4. Gravity FormsContact Forms
  5. W3 Total Cache Improve the speed of your website using caching

For Web Designers

  1. MainWPManage Updates for many WordPress websites
  2. Advanced Custom FieldsGreat for developing custom functionality
  3. WP Migrate DBWP Migrate DB Profor migrating WordPress websites from development to staging and production
  4. WP All Import & WP All Import Pro – import CVS and XML files into WordPress

How to enable web push notifications for your WordPress blog

If you visit Product Hunt, you’ll be prompted by your browser (if your browser is Chrome, Firefox, Safari, or Android) if you wish to receive notifications from this site:

web push notifications
If you click yes, every time Product Hunt release a new blog post, your computer will notify you with a pop up message in the lower right hand corner of your monitor. Try subscribing to Product Hunt and see what happens.

If you ever want to unsubscribe from notifications, click the gear icon at bottom right of the notification window and choose Block next to the site you want to unsubscribe from.

If you’d like this on your own website, you can have it through various browser web push notification providers.

This blog post is about installing web push notifications on your WordPress website using One Signal.

For the most seamless user experience, your site needs to have a secure certificate so it loads securely over https. I’ll be publishing a blog post about how to gain a free SSL certificate through Let’s Encrypt soon.

If your site only loads over http, One Signal displays a red bell icon at bottom right of your webpage rather than prompting the user if they want to subscribe using the notification window above.

one signal icon http

How to install OneSignal on your WordPress website

  1. Install OneSignal WordPress plugin

Download or install the OneSignal WordPress plugin. Enable the plugin.

2. Sign up for a OneSignal account

Visit https://www.onesignal.com/ in a new browser tab and click Sign Up Free.

3. Add an App

  • Once you’ve signed in, click Add a new app
  • Give the app a name – this name is not public
  • In the Select one platform to configure window, select Website Push and click Next
    select website push
  • At this next step we’ll first configure Google Chrome and Mozilla Firefox – select this option
  • At this stage, open the Google Services Wizard in a new browser tab
  • Type any name to create a new app, or select an existing Google app from the dropdown.
  • In this example, we create an app named test-app
    chrome-settings-1
  • We do not use the Android package name, but you must enter a value to continue. Please use the value test.test as shown below.
    chrome-settings-2
  • Choose and configure services to continue.
  • Wait a minute for the project to be created.
    chrome-settings-3
  • Click Enable Google Cloud Messaging.
    chrome-settings-4
  • Get your Google keys. Save the two values listed
    • You’ll need your Server API Key later in our SDK Installation guide
    • You’ll need your Sender ID, also known as the Project Number, later as well
  • Go back to your OneSignal browser tab, and:
    1. Enter your site URL
    2. Enter your Google Server API Key
    3. Leave Default Notification Icon URL blank unless you want to customize the notification URL
    4. If necessary, click My site is not fully HTTPS if your site is on HTTP. If you select this:
      • Enter a string to use as your OneSignal subdomain – use a pretty name if you wish
      • Enter your Google Project Number. You can get this by:
        • visiting https://console.developers.google.com/iam-admin/projects
        • selecting your project
        • click the 3 dot icon at top right, and select Project Information
          google console project information
    5. On the next screen Select your target SDK, select WordPress
    6. Make note of the Your Rest API Key and Your App ID
    7. Go back to your WordPress admin browser tab, select OneSignal Push in the left hand admin navigation column
    8. Go to the Configuration tab
    9. Enter Your Rest API Key and Your App ID
    10. Enter your Google Project Number. You can get this by following the instructions above
    11. Scroll down to the bottom of the page and select Save.
    12. Open your WordPress website home page in a new browser tab. Confirm you’re being prompted to allow notifications (if your site is on HTTPS) or you see a red bell icon at bottom right (if you’re on HTTP).
    13. Once confirmed, go back to your OneSignal browser tab and click Check Subscribed Users.
    14. Click Next, and if you’re prompted for a User ID, open https://onesignal.com/apps/ in a new browser tab, click your application name, in the left hand navigation column click All Users, and grab the Player ID. Enter this as the User ID back in your last browser tab, and click Next
    15. Click Send Test Notification
    16. Wait 10 seconds, and hopefully a notification like the following will display on your screen:
      test notification
    17. Click the message. You should see a message in your browser congratulating you that your app is now setup for push notifications:
      one signal congratulations
    18. Go back to your last browser tab
    19. Click Check Notification Status. Hopefully you will be congratulated again:
      one signal congratulations
    20. Good job! Click Done.
    21. You’ve now set up web push notifications for Google Chrome and Mozilla Firefox.
    22. If you’d like to do the same for Apple Safari, continue following.
    23. In the same browser tab you just clicked Done in, click App Settings on the left, scroll down to Safari and click Configure.
    24. Enter your site name and URL
    25. Click Save
    26. Select WordPress and click Next
    27. Grab Your Safari Web ID
    28. Go to your WordPress admin > OneSignal Push (on the left) > Configuration tab, and enter your Safari Web ID. Scroll to the bottom of the page and click Save
    29. Load your site in a modern version of Safari. Ask your mate to if you don’t have Safari. Ensure Safari asks if you want to subscribe to notifications. Click Yes.
    30. Go back to the last OneSignal browser tab you were in and click Check Subscribed Users.
    31. Go back to step 14 above, and follow through to step 20.
    32. You’ve now set up web push notifications for Apple Safari also.

This just scratches the surface of what OneSignal can do. If you go back to your App Settings in OneSignal, you can see you can set up notifications for Mobile & Desktop Platforms too:

  • Apple iOS
  • Google Android
  • Windows Phone 8.0
  • Windows Phone 8.1+
  • Amazon Fire (Amazon’s version of the iPad)
  • Mac OS X
  • Google Chrome Apps & Extensions

If you want me to cover those too, drop a comment and say so. 🙂

 

Fremantle Dockers Facebook Cover Photos

Here are some Facebook cover photos you may enjoy.

The white columns are the Fremantle Dockers’s ladder positions from 1995 to 2015.

Dockers Ladder Positions in blue

Dockers Ladder Positions in blue

Dockers Ladder Positions in purple

Dockers Ladder Positions in purple

Dockers Ladder Positions in red

Dockers Ladder Positions in red

Free alternative to the brilliant “Snag It” for short videos.

You may need to record videos of your screen to show clients how to do stuff or show support staff what is not working properly.

One of the best solutions I’ve found to do this is the software Snag It. The only problem is this piece of handy software costs around AU$65. Tech Smith, the company behind the software, produce a great array of software, so you might be heading in the right direction if you purchase one of their products.

However, because I prefer minimizing my costs, I discovered Tiny Take. The free version records up to 5 minutes of video, which suits me fine, as I am not producing anything longer than that.  Tiny Take do offer paid versions of the software, up to $199.95 for 120 minute length videos.

When my need for longer length videos appears, I will head back to Snag It, which does not require a recurring subscription and provides free updates to each update to the major version you purchase.

How to get more out of less

living the 80/20 wayThis book validates my personal work experience, where a small number of clients generate the most work and income for me, and I get the most amount of happiness and satisfaction from a smaller amount of personal relationships.

There is a way to relax, enjoy life, put loved ones first, express yourself to the max, also achieve your dreams. Happiness, Richard Koch says, flows from doing less, not striving more. No surprise there perhaps. But he also asserts that achievement and success can come from doing less. There is a free lunch after all. And the taste is out of this world.

The claim is based on his ground-breaking research into well-validated ’80-20 Principle’. Although is it not clear why, it is nearly always true that the great majority of results come from a small minority causes or effort, that 80% of results flow from just 20% of the causes. For example , 80% of sales usually come from less than 20% of customers, we send more than 80% of our emails to fewer than 20% of the people in our address book, and fewer than 20% of all motorists cause more than 80% of accidents.

Richard Koch’s business classic The 80/20 Principle is an extraordinarily successful and influential book around the world. Yet, although he wrote mainly about corporate success, it was the short third part of the book book applying the 80/20 principle to our personal lives that caused a great stir. In this new book, Living the 80/20 Way, Koch focuses exclusively on how to succeed personally as professionally, to make a good life as well as a living while doing less. The key, he says, is to work out the few things that are really important, and the the few methods that will give us what we really want, and to act on them, while ignoring the mass of trivia that normally engulfs our lives. It sounds simple, and it is…but nobody has explained the idea before in such a convincing way, nor based it so persuasively on a proven phenomenon.

The 80/20 Way shows you how to apply these lest is more and more with less ideas to your best 20 percent for success, money, relationships and the simple, good life, and will help you develop a personal action plan to transform your life.

The modern delusion is “more with more”— that to get more out of life, and succeed in what we want, we have to work harder, devote more time to our professional live, and make all kinds of sacrifices and trade-offs. Koch says No. He shows how, in all aspects “less is more”. We only live fully by subtraction. We make progress by stripping our activities, and concerns back to a small authentic core.

What makes this book different from the multitude of “self-help” manuals is the idea that success and relaxation, far from being incompatible, are really twin cherries on a single stalk. Koch demonstrates that success and happiness flow and from cutting out the parts of our lives that we don’t like. If we have the courage to go against conventional wisdom, we can work less, worry less, succeed more, enjoy more, and make the people who matter in our lives hugely happier.