Docker container: Gitea
Docker container on DockerHub
https://hub.docker.com/r/gitea/gitea
Docker installation
https://docs.gitea.io/en-us/install-with-docker/
Docker container on DockerHub
https://hub.docker.com/r/gitea/gitea
Docker installation
https://docs.gitea.io/en-us/install-with-docker/
Install as Docker container
http://www.panticz.de/docker/container/gitea
Download archive
https://dl.gitea.io/gitea/
Migrate from gogs
https://docs.gitea.io/en-us/upgrade-from-gogs/
Backup
https://docs.gitea.io/en-us/backup-and-restore/
Links
https://gitea.io/
CLI
https://developer.openstack.org/firstapp-libcloud/networking.html
# search server by port ID openstack port show -c device_id -f value ${PORT_ID} openstack show show ${PORT_ID} openstack router show ${PORT_ID}
Port
https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/port.html
sudo apt-get install -y tinyproxy sed -i 's|#Allow 192.168.0.0/16|Allow 192.168.0.0/16|g' /etc/tinyproxy.conf sed -i 's|Port 8888|Port 8080|g' /etc/tinyproxy.conf service tinyproxy restart
Virtio driver
https://fedorapeople.org/groups/virt/virtio-win/deprecated-isos/stable/virtio-win-0.1-81.iso
Create VM
DISKIMG=win7.img WIN7IMG=../iso/de_windows_7_professional_with_sp1_x64_dvd_u_676919.iso VIRTIMG=../iso/virtio-win-0.1-81.iso sudo qemu-system-x86_64 \ --enable-kvm \ -m 4096 \ -smp cores=2 \ -drive file=${DISKIMG},if=virtio \ -net nic,model=virtio \ -net user \ -rtc base=localtime,clock=host \ -usbdevice tablet \ -soundhw ac97 \ -cpu host \ -vga std -vga qxl \ -drive file=${VIRTIMG},index=3,media=cdrom \ -cdrom ${WIN7IMG} \ -vga vmware
Container
https://hub.docker.com/_/haproxy
Configuration
/tmp/haproxy/haproxy.cfg
global maxconn 4096 #stats timeout 30s #debug defaults log global mode http option httplog option dontlognull timeout connect 5000 timeout client 50000 timeout server 50000 log 127.0.0.1 local0 #option httpchk frontend frontend1 bind :80 mode http use_backend backend1 backend backend1 mode http balance roundrobin option httpchk GET / HTTP/1.1 http-check expect status 400 server www1 172.17.0.2:80 check server www2 172.17.0.4:80 check server www3 172.17.0.6:80 check listen stats bind :9000 mode http stats enable stats hide-version stats realm Haproxy\ Statistics stats refresh 60s stats show-node stats auth haproxy:password stats uri /
Deploy
docker run -d --name haproxy -v /tmp/haproxy:/usr/local/etc/haproxy:ro -p 8080:80 -p 9000:9000 haproxy:latest docker logs -f haproxy
CONTAINER=haproxy # Create container lxc launch ubuntu:18.04 ${CONTAINER} sleep 10 # Deploy SSH key lxc file push --uid 0 --gid 0 --mode 600 ~/.ssh/id_rsa.pub ${CONTAINER}/root/.ssh/authorized_keys # Configure http(s) proxy inside of container (if set on host) [ -z ${http_proxy} ] || echo "export http_proxy=$http_proxy" | lxc shell ${CONTAINER} -- tee -a /etc/environment [ -z ${https_proxy} ] || echo "export https_proxy=$https_proxy" | lxc shell ${CONTAINER} -- tee -a /etc/environment # Update APT repository lxc exec ${CONTAINER} -- bash -c ". /etc/environment && apt update" # Optional: install applications lxc exec ${CONTAINER} -- bash -c ". /etc/environment && apt install -y haproxy"
https://yt-dl.org/update
https://github.com/ytdl-org/youtube-dl/releases
wget -q https://github.com/ytdl-org/youtube-dl/releases/download/2019.04.30/youtube-dl -O /tmp/youtube-dl sudo cp /tmp/youtube-dl /usr/local/sbin/ sudo chmod a+x /usr/local/sbin/youtube-dl # download audio (mp3) only youtube-dl --extract-audio --audio-format mp3 -o "%(uploader)s/%(title)s.%(ext)s" https://www.youtube.com/watch?v=XXX # download whole channel starting from 3 months youtube-dl --extract-audio --audio-format mp3 -o "%(uploader)s/%(upload_date)s_%(title)s.%(ext)s" --dateafter now-3months -v https://www.youtube.com/user/OpenStackFoundation/videos # update sudo youtube-dl -U
# output template
https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template
Install tftp server package
sudo apt-get install -y xinetd tftpd tftp
Create xinetd tftp configuration
cat <<EOF> /etc/xinetd.d/tftp service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no } EOF
Create /tftpboot folder
sudo mkdir /tftpboot sudo chmod -R 777 /tftpboot sudo chown -R nobody /tftpboot
Restart the xinetd service
sudo service xinetd restart
Testing our tftp server
ip a add 192.168.1.1/24 dev eth0:1 echo foo > /tftpboot/testfile tftp 192.168.1.1 get testfile quit
Links
https://askubuntu.com/questions/201505/how-do-i-install-and-run-a-tftp-server