Page 3 of 18

ActivityPub Test

This is a test for the ActivityPub plugin, I’ll write more about this later.

Fitness for Mental Health a CrossFit event to help raise money for mental health

The information below was taken from my Just Giving page. If you would like to donate then please head over to this link where your donation will be hugely appreciated. Also, if you would like to buy some “Fitness for Mental Health” merch, head over to here. 90% of all profits will be doanted to Mind Charity.

We will be performing a Crossfit workout named Becky on the 12th of October. Anyone can participate and all donations will be greatly appreciated. If you do perform the workout, a video of your performance will also be greatly appreciated too, in order to help spread and raise awareness for mental health. You can use the hashtag #FitnessForMentalHealth on all your favourite social networks to help spread awareness.

I’m doing this because my wife and I have both suffered from severe mental health. I’ve had major anxieties due to work, to a point where I would throw up constantly if I took a day off work. My wife has had severe depression because of struggles within her life. We also know so many people who either suffer or have had suffered from mental health in one way or another.

I want to give something back to everyone who suffers through life and doesn’t want to wake up in the morning for work or to see friends. This is why I’m fundraising and all donations received will be going to Mind Charity because they do some amazing work for those that suffer from mental health.

The workout is as follows…

For Time

  • 800 meter Run
  • 30 Squat Snatches (95/65 lb)
  • 400 meter Run
  • 30 Hang Cleans (95/65 lb)
  • 200 meter Run
  • 30 Back Squats (95/65 lb)
  • 400 meter Run
  • 30 Push-Ups
  • 800 meter Run
  • 30 Pull-Ups

A little background behind the Crossfit workout called Becky…

“Becky” Rebecca Sefscik, a coach at Crossfit The Tracks (Erlanger, KY) and US military veteran, created this workout herself in 2012. Becky Sefscik took her own life on August 31, 2015, after a battle with PTSD.

Her box’s website posted that the workout “was tough, just like Becky…She was one of our favourite trainers, best friends and she’s missed every day. She was not only an amazing coach, but she was one of the strongest people we all knew, mentally and physically.”

In 2015, starting with a CrossFit The Tracks fundraising event on September 7, over 100 gyms and thousands of CrossFitters worldwide did this WOD in a celebration of Becky’s life and supporting 22 Until Valhalla for veterans and families affected by suicide and PTSD.

Top 5 plugins for WordPress

These are my top 5 plugins which I think most people should have, especially if you’re a blogger looking to make connections and/or your site as fast as possible.

5. Smush

Smush is a fantastic plugin which can help speed up your website by compressing images. You can bulk ‘Smush’ as they say which will compress images with a single click. If you’re on the free version, you can Smush up to 50 images at a time. However, if you pay to upgrade, then you can Smush as many images you like. Both versions will allow you to auto-Smush any future uploaded images.

People say you should install this asap to avoid tons of images needing to be compressed. This way, all images are compressed the minute you decide to upload them.

4. AMP (Accelerated Mobile Project)

AMP is so good, WordPress themselves decided to help maintain and support it. Google asks that any news site uses AMP, this way your site won’t load any unneeded CSS and/or JavaScript when showing in Google search. Google may also give you a slightly higher ranking because AMP shows your site is faster than those that aren’t using it.

3. Super Progressive Web Apps

Progressive Web Apps (or PWA for short) allows users to install your blog onto their desktop/tablet/mobile devices. This gives them easier access to your website and it’s much better than bookmarks which are never to be seen again. Users will even be able to see your blog offline due to caching, just like a native app on your phone. And best of all, you don’t need to submit your blog to any app store, it works straight from any browser which supports PWA. – Download plugin

2. Yoast SEO

Yoast SEO is another great package, even if you don’t use it for the SEO part. Then the readability section is great for general blogging. I love getting a little green smile telling me posts are readable. The SEO section is also a very good indicator if you have keywords you would like to hit.

1. JetPack by WordPress.com

Finally, JetPack by WordPress.com is my most important plugin for bloggers. Especially if you’re looking to connect with a much wider audience. Think about how Medium connects all their readers to a Medium Blog. Now think about hosting that one your own site while still having that audience, and then you have the JetPack plugin.

There are of course many other benefits, such as lazy loading images for faster pages. Automatically share your posts across all your different social networks. If you wanted to, you could also pay extra to enable backups, advanced built-in search and malware protection.

The easiest way to install any of these plugins is through your site’s admin panel. You can copy and paste any of the above plugins to find what you need.

Have you got any other plugins you could recommend?

Sound of in the comments below…

The future of blogging is Headless and the JAMStack

I haven’t made a blog post in a while. But as some of you may know, I migrated my website from WordPress to VuePress and moved to host from SiteGround to Netlify. I am super happy with the results and everything just works and won’t break randomly. My site can’t get hacked because everything is completely static and I also get an added benefit of speed.

My site on SiteGround was going so slow. It was in the 20s for mobile and now it’s in the 60s which is incredible. For desktop, it’s around 98 to 100 (Google PageSpeed results can vary). The speed improvements are now down to me to sort out since it’s not the fault of Netlify. This is great because it gives me more control on how to improve my site which I will be working on at some point. Right now I’m looking at moving michaelbrooks.dev and brookspetsitters.com to Netlify. Which will be using Vue (not VuePress) and TailWind CSS as my main assets. Progress is slow due to other work commitments. But it’s going great and I hope to be releasing michaelbrooks.dev very soon.

How I’m adding content

You may be wondering how I’m adding content which is another interesting topic. I could add or edit my posts locally and preview locally before pushing to Git and then deploying to Netlify. However, an easier way is to use NetlifyCMS. You simply add an HTML file into a public admin directory, hook up “Identity” using the Netlify backend. Then create a configuration file which tells Netlify where and how you want your pages to save. Once done, you can then go to /admin and create new pages or posts. Once saved, Netlify will push it up to GitHub which will then automatically trigger a deploy ready for everyone to see.

It’s well and truly amazing, and if you want to know how I got started using VuePress as my blog, you can check out this lovely blog post by Howar31.

I hope you enjoyed this blog post. I will try to get back to more of a schedule very soon. Also, I will be constantly updating this site as there are lots of improvements to be made. Such as lazy loading images, a better RSS feed, and possibly a custom VuePress theme.

A Netlify Test

Last week I signed into my WordPress blog and found I had errors. These errors seemed to have occurred through my Neve theme which may have been caused by an upgrade somewhere along the lines. I tried to trace the errors back through my daily backups, but it seemed no matter what I did, I still had errors.

Because of this, and because it’s seemingly not my fault, I decided to move away from WordPress. I’m now using VuePress which is based on VueJS and generates markdown files into the correct HTML format. It’s not initially meant for blogging, which meant I had to tweak it a little, but I’m liking the change.

I hooked VuePress up to NetlifyCMS which gives me a nice editor. It will then create new branches on GitHub whenever I save an article, and once I hit publish, it will merge the PR into my master branch.

This is powerful and it means there will be less errors because of how static it is. I can update the packages myself and rollback to any previous changes if need be. Netlify also allows you to preview any branches which can be very powerful, especially if you made some huge changes and you’re not sure if they’ll deploy the way you’d like.

You can also A/B test your branches and see what UI changes work best for you. It’s an incredibly powerful system and I highly recommend it to anyone who thinking going to headless or static sites.

Docker: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

This error has had a lot of people stumped by the looks of their issues on GitHub. I think the error stems from downloading Docker through their main landing page. I tried a lot to fix the issue and with no luck. This included switching the DNS over to 8.8.8.8 which has been suggested in the past and worked.

My answer to the issue is don’t use the main landing page to install Docker. Instead, you want to download it from here and then everything should work as normal.

If you have any questions, or feel it hasn’t worked for you, then please let me know.

Enjoy reading this blog? Please consider subscribing using the form below.

windows programming

Windows version of Linux’s $(pwd)

Tonight I was playing around with Docker in Windows and I wanted to use Node to install my packages to my local environment. Then I found a command on Chris Fidao’s Laravel Vessel website which looked like…

docker run --rm -it -v $(pwd):/opt -w /opt shippingdocker/php-composer:latest composer create-project laravel/laravel my-app

I modified it for use with npm to…

docker run --rm -it -v $(pwd):/opt -w /opt michaelbrooks/node:latest npm i vuepress

I ran the command and got the following…

docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only 
"[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run
--help'.

A quick search and I found I could replace $(pwd) with %cd% which looked exactly like this…

docker run --rm -it -v %cd%:/opt -w /opt michaelbrooks/node npm i vuepress

Enjoy reading this blog? Please consider subscribing using the form below.

101% Reached of my target for Macmillan Cancer Research

It’s been over a week since my colleagues and I completed the Jurassic Hike for Macmillan cancer support. I’m happy to announce that I finished the 26-mile hike and raised a total of £253.44 which is 101% of my target. Together as a team, we all managed to succeed our targets and in total reached 117% of our goal which amounts to £2,045.87.

This is amazing and I’m well and truly shocked and surprised with the amount of donations and support we received for doing this. The whole hike was amazing and I actually made an Instagram post which describes exactly how I felt. Instead of rewriting it, I will share the image below and you can read more.

Thank you so much to everyone who donated, shared and supported our efforts towards such an amazing cause. You are all awesome and I love you all.

75% of target reached for the Macmillan Mighty Hike

For everyone who has donated and shared, I just wanted to say a massive thank you. The event starts next week and it’s a gruelling 26-mile hike. We are now 75% towards our target, and I need your help to reach 100%. Please donate if you can, if not then please share this article so others can see.

My colleagues and I have done so much training, and gone through so much pain in preparation for the event. Just last weekend, we walked 22 miles, and our bodies hurt the next day. However, all this training and pain is worth it. It’s worth it, because those of have battled cancer, or are still battling cancer have gone through so much more.

They battle through the pain, they battle through the heartache, anxiety and so much more! This makes what we are doing worth it.

My mum battled cancer twice and won. She is my hero and everything I do, I do it for her. Of course, not everyone is as lucky and we must remember those who lost the battle to cancer. That’s why we’re doing this, to help the survival rate and to ensure cancer becomes a non-issue.

Please help us, donate and share anywhere you can and we will be super grateful for your support. We love you all!

(UK) How to become a contract web developer

So, you want to get into contract development, but you don’t know where to start? Let me explain how to get started, and what you need in order to begin contracting. Strap in, because this is going to be a long one.

Setting up your business

First off, you will need to either set up your own limited company or find a service which offers an umbrella company. There are multiple ways to set up a limited company. You can create the company yourself, or use a service to do it for you. I was personally recommended a company myself called “The Company Warehouse“. They also offer accountancy packages which may suit your needs.

You could also use companies such as Your Side Kick, JSA Group etc. These companies will set up your business and deal with taxes, PAYE etc. If you decide to go alone, then you will need to register on the gov.uk website.

After you’ve set up your limited company, and if you didn’t use a service, then there are extras to consider. These are; PAYE, tax and VAT. All of this can be done on the gov.uk website, but you need to take care to ensure you fill the details correctly.

Another thing to consider if you haven’t used any of the services above is an accountant, they can deal with your yearly taxes and any VAT submissions (should you require it). They can set you up with accountancy software such as Quick Books, Free Agent, Xero etc. Once they set you up, they will help to get you started and can let you go on your own once you’re confident enough to use the software.

Deciding who to bank with

There are so many banking companies out there, even more with the boom of Fintech banks. Personally, I chose Starling which is a fantastic fintech company. They offer 0 monthly fees, they charge £3 fee per money withdrawal at Post Offices. However, you can also choose from the following… Monzo, Tide, Coconut and many more. There are also traditional bank accounts such as HSBC, Barclays, Santander etc.

It is up to you to research each bank and find the one that best suits you. Once you have done this, you should hook it up with your accounts management software or notify you accountant.

Looking for contracting work

You have the business side of things taken care of, now it’s time to find work. How do you do this?

There are tons of options available for you, if you have connections elsewhere, then you can ask them. You can go to Slack or Reddit communities where other devs are already working for companies looking for contractors. I actually found my role through an agency called Nigel Frank on LinkedIn. They are a worldwide agency so there’s plenty of work to go round.

Speaking of LinkedIn, that’s a massive resource which I recommend. You can join communities and connect with like-minded people. People are always advertising for positions on LinkedIn too, so be sure to use the search to your full advantage. Twitter and Facebook may also help, but I haven’t had any luck on there just yet.

Another great step would be to set up your own website to advertise your work and the fact you’re looking. You can create a contact form, add your phone number and share to friends and family who may also share to others.

Hang out at conferences by using MeetUp.com to your advantage while learning new skills. I recommend you go when there are interesting topics, otherwise, you might not have any luck. You may also want to create some business cards which you can hand out to people you meet.

Finding a suitable accountant

Finding a suitable accountant is something else you will need to consider, especially if you’re not sure how to handle the money side of things. I personally used a local accountant which was recommended to me by a friend and you may want to do the same. However, a company I keep seeing and has been recommended by a lot of people is Crunch. These guys seem great and I would definitely recommend you check them out.

They also made a great article on starting up your own LTD company which you should definitely read.

Optional: Work Equipment

This one depends on your circumstances. If you have got a working laptop and all the gear for working elsewhere, then you can skip this. Otherwise, you will need to find a laptop. You may also need some dongles, a mouse and keyboard, earphones or headphones, or monitor cables.

I personally went with the HP Envy 13″ with a USB-C dongle. The dongle has 2 USB-A, one USB-C, ethernet, one VGA and one HDMI ports. My mouse is a Razer (can’t remember the model) and I use the keyboard that’s on my laptop. My workplace offered me a monitor with HDMI cable, but you may want to take your own display cables just in case. I can also connect to their network via ethernet.

It came with Windows 10 pre-installed, but I chose to install the latest Ubuntu software. In hindsight, I should have chosen the LTS version due to software support. I will stick to the next LTS version to avoid this situation in the future.

Final Thoughts

As far as starting out with contracting, that’s pretty much it. You may also need to learn to invoice your clients although my agency does that for me. However, I still have to fill in timesheets every week in order for them to keep track and I create invoices that never go to them.

Read my story on how I got start with contracting…