ARDUINO: control your gate, pump just with single power button

It is often necessary to control remotely two-state devices like entrance gate, water pump, RF switch or IR switch. My idea was to keep just single on/off button and keep smallest possible leakage current.
You can see my idea on schematic below.

Windows Server - make network private

You can mark your network location on windows host as private just in three steps

1. Launch PowerShell as administrator
2. Get list of network interfaces (NICs) with command
Get-NetConnectionProfile

3. Change network category for selected network interface
Set-NetConnectionProfile -InterfaceIndex 15 -NetworkCategory Private


Enjoy!

Arduino - Easter Egg Dyeing

You know that modern eastern egg dyes requires about 5 minutes to make super bright eggs. It also takes about 5 minutes and 10 lines of code to create the countdown timer with left minute display on arduino.
The schematic diagram is more than simple. Just connect 5 or more green LEDs on ports 0-7 and one red LED on port 8.

Here is photo of my assembled board.

Is it possible to make the code shorter?!
/*
  Arduino - count down timer
*/

int MAX_LEDS = 5; // max_leds = maximun minutes
int counter = 60 * MAX_LEDS; 
bool flip_flop = LOW;

void setup() {
  
   DDRB = DDRC = DDRD = 255; // set all ports to output
   PORTD = (((unsigned int)1 << MAX_LEDS) - 1); // ON first N LEDs

   while(counter--){
    delay(1000);  // wait for a second
    flip_flop = flip_flop == LOW ? HIGH : LOW;
    digitalWrite((int)(counter/60), flip_flop); // blink current minute LED
   }

   while(true){
    delay(1000);  // wait for a second
    flip_flop = flip_flop == LOW ? HIGH : LOW;
    digitalWrite(8, flip_flop); // blink red light
   }
}

void loop() {

}

and video

Enjoy!

HOWTO: Repair Logitech M325 Mouse

FixIt says that you will find single screw under CE label. It isn't always true.