This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(from : https://simplifiedthinking.co.uk/2015/10/03/install-mqtt-server/ ) | |
Installing Brew | |
The Mosquitto MQTT Server can be easily installed using Homebrew. If it’s not installed on your system already, then a quick visit to the homepage will give you all you need to get going. Homebrew is an OS X Package Manager for installing and updating non-Mac OS X utilities that are more commonly found in other variants of Linux. To install the basic package manager run the following command. | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
Installing Mosquitto MQTT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "encoding/json" | |
import "fmt" | |
type Person struct { | |
Name string `json:"name"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# when you try to start docker | |
# sudo systemctl start docker | |
# and the output is: Failed to start docker.service: Unit docker.service is masked. | |
# | |
# | |
# ls -la /etc/systemd/system | grep docker | |
# see for /dev/null if there is | |
systemctl unmask docker.service | |
systemctl unmask docker.socket | |
systemctl start docker.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# when you try to start docker | |
# sudo systemctl start docker | |
# and the output is: Failed to start docker.service: Unit docker.service is masked. | |
# | |
# | |
# ls -la /etc/systemd/system | grep docker | |
# see for /dev/null if there is | |
systemctl unmask docker.service | |
systemctl unmask docker.socket | |
systemctl start docker.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"time" | |
"github.com/gin-gonic/gin" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.23.0-bookworm AS build | |
ARG upx_version=4.2.4 | |
RUN apt-get update && apt-get install -y --no-install-recommends xz-utils && \ | |
curl -Ls https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz -o - | tar xvJf - -C /tmp && \ | |
cp /tmp/upx-${upx_version}-amd64_linux/upx /usr/local/bin/ && \ | |
chmod +x /usr/local/bin/upx && \ | |
apt-get remove -y xz-utils && \ | |
rm -rf /var/lib/apt/lists/* |