Skip to content

Instantly share code, notes, and snippets.

View jhalbrecht's full-sized avatar
💭
Grinning; It works! XamarinForms Mqtt secure mosquitto broker connection.

Jeff Albrecht jhalbrecht

💭
Grinning; It works! XamarinForms Mqtt secure mosquitto broker connection.
View GitHub Profile
@jhalbrecht
jhalbrecht / Readme.md
Last active July 9, 2019 19:08 — forked from sarmis/foldergallery.html
Justified Image Gallery as Hugo shortcode

Forked and making some changes to better support how I'm using page resources in a Hugo Page bundle.

Usage { {< foldergallery src="imgs" >} } I changed this to;

{ {< foldergallery src="." >} } Which picks up all the files in my leaf page bundle including index.md

I want to change the "imgs" in the shortcode to something like;

{{ with .Resources.ByType "image" }}

@jhalbrecht
jhalbrecht / mqttclient.cs
Last active November 4, 2017 00:13 — forked from mauroa/mqttclient
System.Net.Mqtt client sample
//Note that you can set more properties and also not set the port,
//in which case the MQTT default will be used
var configuration = new MqttConfiguration { Port = 55555 };
//Creation of the MQTT client
var client = await MqttClient.CreateAsync("192.168.1.29", configuration);
//MQTT connection of the client. You can pass optional args to the
//ConnectAsync method and credentials
await client.ConnectAsync(new MqttClientCredentials("testClient"));
Here is example of configuring the SPI0 pins.
First, verify cape unverisal is loaded:
[quote]
root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln
@jhalbrecht
jhalbrecht / J5TennisBall.js
Last active December 28, 2015 20:29 — forked from rwaldron/J5TennisBall.js
This is @rwaldron suggestion (unTested) for me to learn a bit better coding style. Removing some of Rick's "Nit's" See lines 18, 21 for my additions, and 37 for pesky error (fixed).
var j5 = require("johnny-five"),
board = new j5.Board();
board.on("ready", function () {
var ping, button, lights, ginches, lowerLimit, offset;
ping = new j5.Ping({
pin: 8,
freq: 250
});