Skip to content

Instantly share code, notes, and snippets.

@ypchen
ypchen / gist:6f60a50070537314ac21
Last active August 29, 2015 14:09
Create a VM to Install Ubuntu 14.04 LTS 64-bit Server on XenServer/XCP
References:
[1] http://softlit.blogspot.tw/2014/05/xenserver-62-and-ubuntu-1404-lts.html
[2] https://github.com/xenserver/xen-4.3/commit/2196372e76456ce859230950a6e484343e990423
[3] http://ubuntuforums.org/showthread.php?t=2216358&page=2
[4] http://virantha.com/2014/05/21/ubuntu-14-04-trusty-on-xenserver-62/
Steps:
@MetalArend
MetalArend / swarm.yml
Last active November 18, 2024 01:43
Run a GitLab Runner on your Swarm
version: '3.4'
secrets:
# Find your registration token at: "Your project" > "Settings" > "CI/CD" > "Runners settings" > "Specific Runners" (look for registration token)
# Register it as `GITLAB_REGISTRATION_TOKEN`: `docker secret create GITLAB_REGISTRATION_TOKEN YOUR_REGISTRATION_TOKEN`
GITLAB_REGISTRATION_TOKEN:
external: true
# Find your personal access token at: "Your user account" > "Settings" > "Access Tokens" > "Create personal access token" (for api)
# Register it as `GITLAB_PERSONAL_ACCESS_TOKEN`: `docker secret create GITLAB_PERSONAL_ACCESS_TOKEN <YOUR ACCESS TOKEN>`
<?php
class ErrorLoggerPlugin extends AbstractPlugin
{
/** @var Logger */
private $logger;
public function __construct(Logger $logger)
{
$this->logger = $logger;
<?php
final class SyncedIdentityRepository extends AggregateRepository
{
public function get(ExternalId $id)
{
$aggregate = $this->getAggregateRoot($id->__toString());
if (null === $aggregate) {
$aggregate = new SyncedIdentity::create($id);
}
@cliftonc
cliftonc / README.md
Last active October 24, 2024 05:47
Brink Flair 300 via Modbus

This is the setup I am using to publish events for my Brink Flair 300 heat recovery unit. I have a Raspberry Pi 3, with an RS485>USB, connected to the 2 & 3 pin of the X15 input of the HRU. The flow in Node-Red talks locally to the device via modbus, and then connects to an mqtt server that is used for further connection to Home Assistant, this appears to be the most robust solution.

I used this USB stick: Rpi RS485 USB, but I think any of them will work. You do not need to buy the super expensive 'digital adapter' and the app, and with this setup you also do not need the super expensive RF bridge and connectors (though will likely want some physical alternative to this setup to turn it on / off if needed).

It currently provides temperature, set fan speed, actual fan speed, binary sensors for max, medium

modbus:
- name: brink_flair
type: serial
port: /dev/ttyUSB0
baudrate: 19200
bytesize: 8
method: rtu
parity: E
stopbits: 1
sensors: