start new:
tmux
start new with session name:
tmux new -s myname
Information | |
Read this: | |
https://chrisjean.com/git-submodules-adding-using-removing-and-updating/ | |
Books: | |
Working with Legacy Code - Michael Feathers | |
Docker in Action | |
Git Workflows (https://www.atlassian.com/git/tutorials/comparing-workflows): |
Docker: | |
containerization is not hardware; Docker doesnt simulate resources and offer them to a program, but restrict all resources except what is specifically allowed. Linux already has containerization, so Docker doesn't provide the software to do this; it provieds a wrapper and an easy interface so people dont mess up containering. | |
Docker's containers are isolated with respect to: | |
pid - a container gets its own pid namespace, which means containers cant see or control processses in other containers (i think). Also, solves problems like if you already have nginx running (solves the port conflict)). Can be overrided with --pid. Can be called "process isolation" | |
uts namespace - (host and domain name) | |
mnt namespace - file system access and structure. that new container will have its own MNT namespace, and a new mount point will be created for the container to the image. | |
ipc namespace - process communication over shared memeory (does this mean it cant use shared memeory?) | |
net namespace - network access an str |
https://docs.python.org/2/library/exceptions.html#module-exceptions | |
Important ones (for Raising): | |
- TypeError | |
- ValueError | |
Declarign your own Exception if you dont need to override anything: | |
class Secret(Exception): | |
pass |
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") | |
hella useful: docker exec -it <container> bash |
For looking at vulnerabilities: | |
nmap | |
nmap -sS 1.2.3.4 (more options: https://nmap.org/book/man-port-scanning-techniques.html) | |
nmap -p <number/range> -Pn <ip address> | |
^ will only scan a particular range or specific port number | |
Fun stuff: | |
mount -o resvport -o nolock -o rw -t nfs 1.2.3.4:/ ~/nfs (osx needs the resvport, because mount does not use a privileged port by default)(Also it is really dumb to have root directories mountable) | |
umount nfs (if you have a directory named nfs, its getting unmounted) | |
showmount -e 1.2.3.4 |