I use tech devices a lot, maybe too much, but I don’t dive in too technically. The few times I have to get things done with more technical tools, I need some reference.
change screenshot format
defaults write com.apple.screencapture type jpg killall SystemUIServer
### External links
All of these scripts must be followed by the path of the image or the directory containing multiple pictures.
exiftool -s -G
-s is used to show the names in ExifTool commands format. e.g.: instead of “Create Date” you see “CreateDate”
-G is used to show the metadata Group to which the metadata tag belongs.
Rename files based on their date and time data.
Images shot at the same moment (photo bursts, for example) are being sorted with increasing single-digit indexes.
Since there are many parameters which might contain conflicting times, there are several different tags which can be analyzed. I sorted them such that the first ones are the ones which are more likely to be found but probably not exact, while the last ones are very precise tags, but less likely to be found in an image metadata.
exiftool '-FileName<FileModifyDate' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r
exiftool '-FileName<DateTimeCreated' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r
exiftool '-FileName<CreateDate' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r
exiftool '-FileName<DateTimeOriginal' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r
exiftool '-FileName<GPSDateTime' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r
-r is used to make the analysis recursive, which means that subfolders are scanned, too.
Organize files in directories based on each image’s dimensions (resolution)
NOTE: the directories are created in the working directory
Move files to folders based on year and month
exiftool '-Directory<FileModifyDate' -d /path/to/directory/%Y/%Y.%m -r
exiftool '-Directory<DateTimeCreated' -d /path/to/directory/%Y/%Y.%m -r
exiftool '-Directory<CreateDate' -d /path/to/directory/%Y/%Y.%m -r
exiftool '-Directory<DateTimeOriginal' -d /path/to/directory/%Y/%Y.%m -r
exiftool '-Directory<GPSDateTime' -d /path/to/directory/%Y/%Y.%m -r
exiftool to copy each image instead of moving it.
Commands above are a personal adaptation of the ones I found from the following sources:
- Every docker container has an IP assigned by default
- by default, docker doesn’t assign a terminal to a container when it’s run
- Docker has a built-in DNS serves that allows containers to resolve each other
- DNS server runs at
- DNS server runs at
to list all running containers
to list running and non-running containers
docker ps -a
to list all the details about a container
docker inspect some-container
to see all the logs of a container running in a background
docker logs some-container
docker run some-image
-itto run an image in an interactive way
-ito check for input
-tto prompt on terminal
- to store data in an external directory
docker run -v /opt/daradir:/var/lib/some-app some-app
-e ENVIRONMENT_VARIABLE=VARIABLE some-appto change an environment variable
To find which network you’re in, use the
private and internal network
no attachment to any network
docker run some-app --network=none
to access from the web
docker run some-app --network=host
Docker files are in
- how can I know the Docker Host IP address?