Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,23 @@ See also: [https://stackoverflow.com/questions/16758525/how-can-i-make-xargs-han

### Batch-converting images with `sips`

Convert HEIC to JPG (macOS only):

```
for i in `find . -name "IMG_04*.HEIC"`; do sips -s format jpeg -s formatOptions 70 "${i}" --out "${i%HEIC}JPG"; done
```

### Batch-converting images with `ImageMagick`

```
# Install ImageMagick (run as root)
yum install ImageMagick # CentOS
apt-get install imagemagick # Debian
# Generate thumbnails
for i in `find . -name "*.jpg"`; do convert "$i" -resize 128 "${avatar/.jpg/_128.jpg}"; done
```


## Strings

### String comparison
Expand Down