Skip to content

Instantly share code, notes, and snippets.

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):
@barthelemypousset
barthelemypousset / Python cheatsheet
Last active October 26, 2020 14:37
Python cheatsheet
## 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")