jabits' musings

public notes

I need to build a RaspberryPi Echo

I so need to build a Raspberry Pi Echo. Below is an instructional video and below that is a link to a Github repo with more detailed instructions. Project: Raspberry Pi + Alexa Voice Service

Customising hugo

Ok, so having got my new site up and running yesterday (see The engine behind jabit) I decided to customise it just a little. First up was to add an about page. From within the website folder I issued: > hugo new about.md which gave me an about.md file in the content folder. All very easy. I, however, wanted to add a profile picture of myself. I could have just added the following markdown to the md page: !(/mypic.jpg) which would work just fine as long as I have placed mypic.jpg in the static folder.

Using HC-SR04 with Node-Red

Using a default Raspbian Jessie (4.1) build, ssh in as pi (password raspberry). Your home directory will be: /home/pi from there you should cd into .node-red > cd .node-red then install r-pi-sonic > npm install r-pi-usonic edit the settings.js file within .node-red and modify the functionGlobalContext like so: functionGlobalContext : { usonic: require('r-pi-usonic') } All going well you should now be able to access r-pi-sonic from within a Node-Red function using context.global.usonic Stop the press Just learned a valuable lesson - always check to see if the npm module you want to use is being maintained.

The engine behind jabit

So it has taken me quite a while to resurrect this site/blog and the reason I have is that I really needed to give the much talked about Hugo a go. Hugo is a static site generator which works as follows: Install Hugo Use Hugo to create a new “post” hugo new post/my-first-post.md. This creates the file my-first-post.md which, as the extenstion suggests, is not html but rather markdown Write your post in the newly created markdown file using the markdown syntax Decide on a Hugo theme you want to use to display your site Preview your site using Hugo’s built server hugo server --theme="blackburn" --buildDrafts.

DOS prompt default location

I spend quite a bit of time in github and work mainly from the command line. So, when I open a DOS prompt on my Windows machine I like it to open in /Documents/Github (the default Github) directory. To do this I simply followed the instructions here (note: although these instructions are headlined as being for Windows 7 they worked fine for me on Windows 10. That’s all folks.