Programming Tutorials

Create a Raspberry Pi 3 Bluetooth tag

I found this https://www.raspberrypi.org/magpi/create-a-raspberry-pi-3-bluetooth-tag/ to be a really nice starting project for my newly purchased Pi 3. However, I did run into a few problems which I will address in this Blog post. You can pretty much follow either this post, or the MagPi one, but my post will address any issues I had when following their tutorial. So to start, they requested I find the Mac address for both my phone and PC. I followed their advice for looking on my phone, but the Mac address was long and full of dashes which looking at the Python script is not what they want. Instead, I used the Pi to search for my phone on Bluetooth and find the Mac address using the following in Terminal...

By Michael Brooks, ago
General Updates

ReactPHP and Symfony

I started listening to a https://phptownhall.com which talks a lot about different PHP and server technologies and on one of the later episodes, they talk about https://reactphp.org. https://reactphp.org is a great asynchronous solution for PHP and it offers non-blocking async which is fantastic and can be easily compared to NodeJS (although we won't be doing that here).

By Michael Brooks, ago
Programming Tutorials

Hosting your site With Digital Ocean and Docker

I want to share with you how I am hosting my website with [Digital Ocean](https://m.do.co/c/d5aca73b366f) (hosting company) and [Docker](https://docker.com) (places your app in containers). First off, I created my droplet on DO and used the docker image from the list of "One-click Apps". The droplet was the $10 a month size as I don't currently need anything more. (If you want to try Docker for a month or two then [click here](https://m.do.co/c/d5aca73b366f)).

By Michael Brooks, ago
Laravel

Using View Composers in Laravel 5.2

I have started using Laravel's View Composers which come in handy when you have a navigation bar that constantly needs certain data. For example, you have an ecommerce store and you need to poll how many items a user has in their basket on pretty much every page they move onto, or you need a login/register button when a user isn't logged in and then a profile options button when they are. You could be really lazy and add the same code/query into every single controller, which yes, that will work, but then that's not DRY (Don't Repeat Yourself). To fix this, we can complete a couple of simple steps and have one bit of code which will constantly be in use every time a certian partial is called.

By Michael Brooks, ago