Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
linux [23:40 17/09/2024] – [VENV] boothtmllinux [04:33 06/02/2026] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
 +====== Docker ======
  
 +==== Install ====
 +
 +https://docs.docker.com/engine/install/debian/
 +
 +==== Wissen ====
 +
 +https://www.youtube.com/watch?v=DESdVoKhIxY&ab_channel=thenativewebGmbH
 +
 +**cgroups:**
 +  * Quotas für CPU auf CPU + RAM-Ebende (Begrezungen)
 +
 +**Namespace:**
 +  * PID
 +  * Netzwerk
 +  * Dateisystem
 +  * etc
 +
 +**Portforwording**
 +
 +1. Host-Port 2. Container-Port ''-p 3000:80''
 +
 +standart ist tcp sonst ''-p 3000:80/udp'' bei beiden -> ''-p 3000:80 -p 3000:80/udp''
 +
 +**Umgebungsvariable**
 +
 +''-e XXX=YYY''
 +
 +**Volume**
 +
 +X = Absl. Path to current docker -> $(PWD) [PWD = Print Working Diractory]
 +
 +Y = Absl. Path to file for docker use
 +
 +''-v /XXX:/yyy'' OR ''-v $PWD:/YYY''
 +==== Commands ====
 +
 +
 +<file bash Docker>
 +
 +sudo docker run hello-world
 +
 +docker --version
 +
 +#herunterladen von images
 +docker pull ubuntu
 +docker pull ubuntu:VERSIONSNUMMER
 +
 +#starten (macht von image -> ausgeführten Container)
 +#docker run PARAM(it = interactiv) IMAGE POGRAMM
 +docker run -it ubuntu bash
 +
 +docker images
 +
 +#docker run -d (detage -> losgelöst -> no output) ngnix:VERSIONSNUMMER
 +docker run -d ngnix
 +
 +#Überblick only activ
 +docker ps
 +#all
 +docker ps -a 
 +
 +#logs -> id bei "docker ps" zu sehen
 +docker logs ID 
 +
 +#stop -> id bei "docker ps" zu sehen
 +docker stop ID
 +#kill -> hart aus
 +docker kill ID
 +
 +#lösche container -> id bei "docker ps" zu sehen
 +docker rm ID
 +#lösche image -> id bei "docker image" zu sehen
 +docker rmi ID
 +
 +#lösche alles was nicht gebraucht wird opt. -> --all --volumes
 +docker system prune 
 +
 +</file>
 +
 +
 +
 +====== VENV Python ======
 +
 +  * virtuelle Umgebung (venv)
 +  * isoliertes Umfeld für deine Python-Projekte 
 +  * Konflikte zwischen verschiedenen Projektabhängigkeiten zu vermeiden
 +  * sicherstellt, dass jede Umgebung ihre eigenen Bibliotheken
 +  * erstellt Ordner im Projektornder meist venv
 +
 +<file bash VENV>
 +
 +#to create
 +python -m venv venv
 +python -m venv PROJEKTNAME
 +
 +#to activate
 +source venv/bin/activate
 +source PROJEKTNAME/bin/activate
 +
 +#to deactivate
 +deactivate
 +
 +
 +-> pip3 install requests
 +-> pip3 install PACKETNAME
 +
 +</file>
 +
 +
 +====== I-Frame ======
 +
 +
 +
 +#iframe
 +
 +{{url>https://boothtml.com}}
 +
 +or
 +
 +{{url>someurl width,height noscroll noborder alignment fullscreen|alternate-text}}
 +https://www.dokuwiki.org/plugin:iframe
 +
 +
 +**Linux comands**
 +<file bash bash.sh>
 +#redshift default
 +redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m randr -v
 +redshift -O 4000
 +redshift -x #reset
 +
 +#thunar fix
 +killall gvfsd-sftp
 +killall Thunar
 +killall thunar
 +
 +killall gvfsd-sftp ; killall Thunar ; killall thunar
 +
 +#del. swap
 +sudo swapoff -a
 +
 +#start webserver
 +python3 -m http.server
 +
 +#Nord-VPN
 +sudo nordvpn c de508
 +
 +sudo nano /etc/systemd/resolved.conf
 +sudo systemctl restart systemd-resolved
 +
 +#https://support.nordvpn.com/de/Konnektivitaet/Linux/1569820152/Aendern-deiner-DNS-Server-unter-Linux.htm
 +DNS=103.86.96.100
 +FallbackDNS=103.86.99.100
 +
 +
 +sudo c 
 +sudo d
 +
 +#ssh-copy-id
 +ssh-copy-id hannes@ruhe.de
 +
 +#festplatten auslastung
 +
 +df -h
 +
 +#Uptime
 +
 +uptime -s
 +echo "Uptime: $(( ( $(date +%s) - $(date -d "$(uptime -s)" +%s) ) / 86400 )) Tage"
 +
 +
 +
 +
 +</file>
 +#top 10 biggest files
 +sudo find / -type f -exec du -h {} + | sort -rh | head -n 10
 +
 +<file bash mails>
 +h.fehre@boothtml.com
 +Fzx3zC2BFdtgCjE
 +netcup-panel: D4frw@213D4frw@213
 +
 +info@boothtml.com
 +qhh}(ZhylwYb
 +
 +info@anyplace24.com
 +JCgoNM9#71q4
 +
 +logs@boothtml.com
 +xLw?6U(MewBc8xLw?6U
 +
 +Posteingangsserver:
 +
 +mail.boothtml.com
 +
 +-   IMAP Port: 993
 +-   POP3 Port: 995
 +
 +Postausgangsserver:
 +
 +mail.boothtml.com
 +
 +-   SMTP Port: 465
 +
 +
 +mx2e15.netcup.net
 +143 STARTLS
 +465 SSL/TSL
 +</file>
 +
 +
 +
 +<file bash modt>
 +/etc/motd
 +
 +sudo apt-get install neofetch
 +neofetch
 +sudo bash -c $'echo "neofetch" >> /etc/profile.d/mymotd.sh && chmod +x /etc/profile.d/mymotd.sh'
 +</file>
 +
 +
 +<file bash open_AndruidStudi>
 +cd /opt/android-studio/bin
 +./studio.sh
 +</file>
 +
 +====== Logs ======
 +
 +
 +Channel Id in URL von Telegramm
 +
 +<file python log Genaral>
 +
 +#Telgramm Logs
 +import requests
 +tel_msg = "Hallo"
 +response = requests.get('https://api.telegram.org/bot6874857401:AAGATnA1J7q3W55-4aELRs1U8hLJ5wd9Ll0/sendMessage?chat_id=1023177651&text='+"WOHER"+str(tel_msg))
 +print(response.text)
 +if response.status_code == 200:
 +    print('Success!')
 +elif response.status_code == 404:
 +    print('Not Found.')
 +
 +</file>
 +
 +<file python php Genaral>
 +https://boothtml.com/panel/test.php
 +$tel_msg = "von php";
 +$bot_token = '6874857401:AAGATnA1J7q3W55-4aELRs1U8hLJ5wd9Ll0';
 +$chat_id = '1023177651';
 +
 +file_get_contents("https://api.telegram.org/bot$bot_token/sendMessage?chat_id=$chat_id&text=WOHER" . urlencode($tel_msg));
 +
 +</file>
 +
 +<file python log MyCaochFinder>
 +
 +#Telgramm Logs
 +import requests
 +tel_msg = "Hallo"
 +response = requests.get('https://api.telegram.org/bot6575656872:AAEUnrY_3A5X5l0eKVS610U3QHo4n03WCEM/sendMessage?chat_id=1023177651&text='+str(tel_msg))
 +print(response.text)
 +if response.status_code == 200:
 +    print('Success!')
 +elif response.status_code == 404:
 +    print('Not Found.')
 +
 +</file>
 +
 +
 +====== GPT ======
 +
 +
 +# price
 +https://openai.com/pricing
 +https://platform.openai.com/tokenizer
 +
 +## text
 +4
 +Model Prompt Completion
 +8K context $0.03 / 1K tokens $0.06 / 1K tokens
 +32K context $0.06 / 1K tokens $0.12 / 1K tokens
 +
 +**3.5 Chat**
 +Model Usage
 +gpt-3.5-turbo, $0.002 / 1K tokens3
 +
 +1 Blogpost = 1000 Artikel = $2
 +
 +Davinci
 +$0.0200 / 1K tokens
 +
 +## images
 +Resolution Price - default token input
 +1024×1024, $0.020 / image
 +512×512, $0.018 / image
 +256×256, $0.016 / image = 1000 images $16
 +
 +
 +-> $16*3= $48 Images  + $2*2= $4 Blogs = $52 for 1000 Blog Artiekls
 +
 +Jährlich $15 Server
 +monatlich. $25 Bunny
 +
 += $40 monatlich