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
services: | |
web: | |
image: ... | |
volumes: | |
... | |
labels: | |
- "traefik.enable=true" | |
# to enforce http port over tcp | |
- "traefik.http.services.web-minecraft.loadbalancer.server.port=80" | |
- "traefik.http.services.web-minecraft.loadbalancer.passhostheader=true" |
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
''' | |
Pouzijeme tridu kotatko z modulu (souboru) zviratka.py | |
''' | |
from zviratka import Kotatko | |
k1 = Kotatko("Micka") | |
k1.uber_zivot() | |
k2 = Kotatko("Mourek") | |
k1.uber_zivot() | |
k2.snez("granulky") |
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
''' | |
Zadani: udelej CLI (command line interface) pro Airbnb | |
Analyza: | |
- user - guest: book, manage bookings, pay, chat | |
- user - host: accept, manage rooms, chat | |
- user - anonym: sign in, sign up, forgotten password | |
Navrh: | |
Zkusime si naimplementovat use case prihlasit - sign in | |
1. Uzivatel pusti v terminalu program airbnb.py | |
2. opakuj |
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
from turtle import forward, left, right, exitonclick, circle | |
def kvet(velikost=100, pocet_listku=10): | |
for k in range(pocet_listku): | |
for i in range(4): | |
forward(velikost) | |
left(90) | |
left(360 / pocet_listku) |
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 l2tp support | |
sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp | |
sudo apt-get update | |
sudo apt-get install network-manager-l2tp | |
sudo apt-get install network-manager-l2tp-gnome | |
https://askubuntu.com/a/898086 | |
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
List all | |
# systemctl list-unit-files | |
Dependency for a service | |
# systemctl list-dependencies httpd.service |
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
# can not use HostName because ip is dynamic | |
# target machine is vm in virtual box and has bridged interface to the network | |
# this is useful when you run vm that shall be accessible the same way as host | |
# machine is and you can not have statically assigned ip from dhcp | |
# edit: following comment is outdated | |
# prerequisity is to have `socat` and `arp-scan` commands available (installed) | |
# also need of providing password for sudo may be avoided by setting sudoers | |
# with proper NOPASSWD directive |
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
from selenium import webdriver | |
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary | |
from selenium.webdriver.common.by import By | |
from selenium.common.exceptions import * | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
binary = FirefoxBinary(r'C:\Program Files (x86)\Mozilla Firefox\firefox.exe') | |
browser = webdriver.Firefox(firefox_binary=binary) | |
#browser = webdriver.Firefox() |
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
[global] | |
workgroup = workgroup | |
security = share | |
share modes = yes | |
# [homes] | |
# comment = Home Directories | |
# browsable = no | |
# read only = no |
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
# ------------------------------------------------------------------------------------- | |
# This config will set up tmux default startup screens. | |
# | |
# Filename ~/.tmux.conf | |
# | |
# You should uncomment and change following items to fit your needs: | |
# - session name | |
# - window names (monitoring, nodejs, django, root console) | |
# - design number and sizes of split screens (run project, watch files, tail files, etc.) | |
# - preexecuted commands (grunt, gulp, management commands, htop, iftop, watch, tree, etc.) |