Skip to content

Instantly share code, notes, and snippets.

@x1024
x1024 / link_multiple_devices.yaml
Last active June 17, 2025 15:26 — forked from dbrand666/link_multiple_devices.yaml
Select multiple entities to link their on/off state. If any selected entity is turned on or off, the other selected entities will be sent a matching on or off command.
@x1024
x1024 / gist:989227
Created May 24, 2011 17:42
BitTorrent task solution
#include<stdio.h>
const int BOWLS = 40;
const int ORANGES = 9;
int count = 0;
// All the places in which an orange can't be placed are 1's
int used[BOWLS];
// A list of the oranges already placed.