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
## Python datatypes: | |
get a datatype: `type(object)` | |
get id of object: `id(object)` | |
### immutable: | |
int: 42 | |
float: 4,2 | |
str: "hello world" | |
bool: True/False | |
tuple: ("hello","world") |
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
Show build history of an image: | |
docker history --format "Date: {{.CreatedSince}}\nCommand: {{.CreatedBy}}\nSize: {{.Size}}\n" --no-trunc decastore-build-tools | |
Reduce filesize: | |
Tail -c 100000000 file.original > file.light; chown --reference=file.original file.light; rm file.original | |
Remove file older than 40 days: | |
find /path/to/files* -mtime +40 -exec ls {} \; | |
Save a file in VI without beeing logged as root (must have sudo rights): |