Archive

Node: set ENV and execute command (Windows)

Pay attention: NO SPACE before &&

set NODE_ENV=local&& webpack-dev-server

NOT

set NODE_ENV=local && webpack-dev-server

Raspberry turn off usb ports

download this

https://github.com/codazoda/hub-ctrl.c

You can control the power on a port using the following command. (I installed it in user bin directory)

sudo $HOME/bin/hub-ctrl -h 1 -P 2 -p 1

That says to control hub 3 (-h 3) port 1 (-P 1) and to turn the power off (-p 0). You can also use ”-p 1” to turn the power back on.

Raspberry: upload Arduino sketch from CLI

install these packages

sudo apt-get install arduino-core arduino-mk

Then add yourself to the dialout group to allow you to upload code to the Arduino board

sudo usermod -a -G dialout pi (Change pi to be your username if different)

Create Makefile

ARDUINO_DIR = /usr/share/arduino
BOARD_TAG = uno
ARDUINO_PORT = /dev/ttyACM*
ARDUINO_LIBS =
include /usr/share/arduino/Arduino.mk

to build

make

to upload

make upload

Lineage OS

Folder for downloaded updates

/data/lineageos_updates

Docker useful commands

View logs of a container

docker logs -f CONTAINER

List all containers (only IDs)

docker ps -aq

Stop all running containers

docker stop $(docker ps -aq)

If you want also to delete containers & images do the following steps, otherwise stop here.

Remove all containers

docker rm $(docker ps -aq)

Remove all images

docker rmi $(docker images -q)