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
... | |
5. Move on to Lesson 2.3 to understand what is happening. | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Lesson 2.3: ON OPERATORS AND MOTIONS | |
Many commands that change text are made from an operator and a motion. | |
The format for a delete command with the d delete operator is as follows: | |
d motion |
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
$ vimtutor |
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
$ nmcli dev wifi | |
IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY | |
MANET-1 Infra 44 405 Mbit/s 100 ▂▄▆█ WPA2 | |
* MANET-2 Infra 1 195 Mbit/s 83 ▂▄▆█ WPA2 | |
MANET-3 Infra 1 130 Mbit/s 77 ▂▄▆_ WPA1 WPA2 |
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: | |
... | |
ports: | |
- "1010:80" | |
- "1111:8888" | |
db: | |
image: 'mysql' | |
... | |
ports: |
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
port | service | explanation | |
---|---|---|---|
139/tcp | netbios-ssn | ? | |
445/tcp | microsoft-ds | ? | |
631/tcp | ipp | ? | |
1010/tcp | surf | ok, a Docker port | |
1111/tcp | lmsocialserver | ok, another Docker port | |
1500/tcp | vlsi-lm | ok, another Docker port | |
3306/tcp | mysql | ok, yet another Docker port | |
5432/tcp | postgresql | ok, I have a PgSQL server running | |
4000/tcp | remoteanything | ok, Jekyll is running on this port |
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
$ ip -c address show | |
---------------------snip------------------------ | |
257: veth896c58e@if256: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-a8510d99f31a state UP group default | |
link/ether c2:9e:33:ca:84:7c brd ff:ff:ff:ff:ff:ff link-netnsid 1 | |
inet6 fe80::c09e:33ff:feca:847c/64 scope link | |
valid_lft forever preferred_lft forever | |
255: vethe88a763@if254: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-a8510d99f31a state UP group default | |
link/ether 9a:ec:54:83:3e:a8 brd ff:ff:ff:ff:ff:ff link-netnsid 0 | |
inet6 fe80::98ec:54ff:fe83:3ea8/64 scope link | |
valid_lft forever preferred_lft forever |
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
$ ip -c addr show | |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 | |
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | |
inet 127.0.0.1/8 scope host lo | |
valid_lft forever preferred_lft forever | |
inet6 ::1/128 scope host | |
valid_lft forever preferred_lft forever | |
2: wlp58s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 | |
link/ether 8c:b2:e0:dc:54:a3 brd ff:ff:ff:ff:ff:ff | |
inet 10.0.0.8/24 brd 10.0.0.255 scope global dynamic noprefixroute wlp58s0 |
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
class City: | |
name: str = "vienna" | |
def create_zoo(self, owner_name: str) -> Optional[Zoo]: | |
zoo_configs: Dict[ | |
str, ZooConfiguration | |
] = ZOOsConfigBuilder().get_configs() | |
config = zoo_configs.get(self.name) |
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
class ZOOsConfigBuilder: | |
def _build_paris_config(animal_types): | |
def _get_config(owner: str, zoo_size: int) -> ZooOutline: | |
animals: List[Animal] = create_animals(animal_types) | |
return ZooOutline( | |
# I also had to rename owner to owner_name and | |
# because I am now instantiating a class | |
# PyCharm automatically underlines the old |
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
class Zoo: | |
def __init__(zoo_outline: ZooOutline): | |
self._owner_name: str = zoo_outline.owner_name | |
# TODO: It would be great to replace self._owner_name with | |
# reference to an actual Person model instance from the database. | |
# We probably get the owner name by fetching the owner person | |
# from the database. | |
# But this might be too invasive. | |
self._free_entrance_day = zoo_outline.free_entrance_day.value | |
# zoo_outline.free_entrance_day is an Enum, thus we call .value |