This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Backup home directory | |
hosts: localhost | |
vars: | |
date: "{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}" | |
tasks: | |
- name: Create archive of home directory | |
community.general.archive: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2.1" | |
services: | |
code-server: | |
image: lscr.io/linuxserver/code-server:latest | |
container_name: code-server | |
environment: | |
- PUID=1000 | |
- PGID=1000 | |
- TZ=Europe/Prague #change | |
# - PASSWORD=password #optional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Docker on Raspberry Pi: | |
curl -sSL https://get.docker.com | sh | |
Add user to docker group: | |
sudo usermod -aG docker ${USER} | |
#relog into raspberry pi | |
Contents of docker-compose.yml file: | |
------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timedatectl status | |
timedatectl list-timezones | grep America | |
sudo timedatectl set-timezone Europe/Prague | |
sudo vim /etc/systemd/timesyncd.conf | |
time.google.com | |
time.cloudflare.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/billw2/rpi-clone | |
sudo apt install git | |
git clone https://github.com/billw2/rpi-clone.git | |
cd rpi-clone | |
sudo cp rpi-clone rpi-clone-setup /usr/local/sbin | |
lsblk | |
sudo rpi-clone sda |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo poweroff | |
https://sourceforge.net/projects/win32diskimager/ | |
lsblk | |
sudo dd bs=4M if=/dev/sdb of=~/rpi-backup-date.img status=progress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install nginx | |
sudo apt install nginx | |
# airdnd.helping.ninja | |
# configure nginx - foundry and ssl redirect | |
# This goes in a file within /etc/nginx/sites-available/. By convention, | |
# the filename would be "yourdomain.com.conf" | |
sudo vim /etc/nginx/sites-available/helping.ninja.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir -m 1777 ~/share | |
sudo apt install samba samba-common-bin | |
sudo vim /etc/samba/smb.conf | |
[share] | |
Comment = pi shared folder | |
Path = /home/pi/share | |
Browseable = yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sSL https://get.docker.com | sh | |
sudo usermod -aG docker ${USER} | |
man usermod | |
groups ${USER} | |
sudo apt-get install python3 python3-pip | |
sudo pip3 install docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install libpam-google-authenticator | |
google-authenticator | |
lastpass authentictor, google authenticator | |
sudo vim /etc/pam.d/sshd | |
auth required pam_google_authenticator.so | |
sudo nano /etc/ssh/sshd_config |
NewerOlder