docker exec -i -t $(docker ps -aqf "name=my-image") /bin/bash
docker cp $(docker ps -aqf "name=my-image"):/some-file.txt .
| blueprint: | |
| name: Motion-activated Light Off | |
| description: Turn off things when no motion is detected. Inspired from from homeassistant - motion_light.yaml | |
| domain: automation | |
| source_url: https://gist.github.com/Mihai-P/5d2266aefaf5d4ddcfdca9cef4080bea | |
| input: | |
| motion_entity: | |
| name: Motion Sensor | |
| selector: | |
| entity: |
| This will install all the programs I need in Ubuntu 20.04 LTS |
| #! /usr/bin/env bash | |
| # creates a JWT in bash | |
| # Static header fields. | |
| HEADER='{ | |
| "type": "JWT", | |
| "alg": "RS256" | |
| }' | |
| # PAYLOAD=$1 |
| #!/bin/bash | |
| # to install docker | |
| sudo apt-get remove docker docker-engine docker.io containerd runc | |
| sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo apt-key fingerprint 0EBFCD88 | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge test" | |
| sudo apt-get update | |
| sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose | |
| sudo usermod -aG docker ${USER} |
| #!/bin/sh | |
| # based on this gist https://gist.github.com/pawelszydlo/e2e1fc424f2c9d306f3a | |
| # port, username, password | |
| # if using a seedbox the server can have the format http://SEREVR:PORT/PREFIX/transmission | |
| SERVER="$TRANSMISSION_SERVER -n $TRANSMISSION_USER:$TRANSMISSION_PASS" | |
| # use transmission-remote to get torrent list from transmission-remote list | |
| # use sed to delete first / last line of output, and remove leading spaces | |
| # use cut to get first field from each line |
| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| # this may fail, some ditros do not have it installed by default | |
| sudo apt-get remove --purge bcmwl-kernel-source | |
| # this may fail, some ditros do not have it installed by default | |
| sudo rm /etc/modprobe.d/blacklist-bcm43.conf | |
| sudo apt-get install bcmwl-kernel-source |
| #!/bin/bash | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" | |
| exit 1 | |
| fi | |
| DEBIAN_FRONTEND=noninteractive apt-get -yq install ddclient | |
| echo Username that you use for noip.com? | |
| read USERNAME |
| #!/bin/bash | |
| # | |
| # A minimalistic backup tool for MySQL or files with auto-cleanup after a certain period, on a Ubuntu or Centos based environments. | |
| # It can handle multiple projects (websites) located on the server where this tool is present. Add one or more *.conf files in the backup.d directory | |
| # For each one of them we generate the md5 checksum. | |
| # | |
| # Requirements: | |
| # - md5sum (usually present by default) | |
| # - tar (usually present by default) | |
| # - mysqldump (it comes with MySQL/MariaDB) |