echo "Hello, World!"
echo -n "Hello, World!" # Brak nowej linii na końcu, przydatne w pipach
echo $'Nowa\nLinia' # Wsparcie znaków specjalnych, np. \n
# kotek albo conCATination — wyświetla zawartość pliku albo łączy dwa pliki
cat nazwapliku
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
#!/bin/bash | |
echo "MOTD:" | |
cat /etc/issue.net | |
echo | |
# List fail2ban jails | |
echo "Fail2ban jails:" | |
fail2ban-client status | grep 'Jail list:' | sed 's/ //g' | cut -d: -f2 | |
echo |
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
import asyncio | |
import datetime | |
def wait_for_clock(hour, minute, result=None): | |
t = datetime.datetime.combine( | |
datetime.date.today(), | |
datetime.time(hour, minute) | |
) |
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
#!/bin/bash | |
echo "#Cloudflare" > /etc/nginx/conf.d/00_real_ip_cloudflare_00.conf; | |
iptables -D INPUT -j cloudflare; | |
iptables -F cloudflare; | |
iptables -X cloudflare; | |
iptables -N cloudflare; | |
for i in `curl https://www.cloudflare.com/ips-v4`; do | |
iptables -A cloudflare -p tcp -m multiport --dports http,https -s $i -j ACCEPT; | |
echo "set_real_ip_from $i;" >> /etc/nginx/conf.d/00_real_ip_cloudflare_00.conf; |