Skip to content

Instantly share code, notes, and snippets.

@bakroistvan
bakroistvan / PeopleTable.patch
Last active March 12, 2018 23:00
Cakephp Tags
39a40
> $this->addBehavior('Tags.Tag', ['taggedCounter' => false]);
@bakroistvan
bakroistvan / do-mqtt.lua
Created December 12, 2019 21:08
nodemcu-mqtt
-- initiate the mqtt client and set keepalive timer to 120sec
mqtt = mqtt.Client("client_id", 120, "<<user>>", "<<pass>>")
mqtt:on("connect", function(con) print ("connected") end)
mqtt:on("offline", function(con) print ("offline") end)
-- on receive message
mqtt:on("message", function(conn, topic, data)
print(topic .. ":" )
if data ~= nil then