Open bartekpacia opened 1 year ago
Get options: setopt
Read about options: man zshoptions
or man zshall
.
Editing multiline commands is possible!
Editing word splitting is possible!
Remove images whose tag contains $TAG
:
TAG=flutter
docker image ls -a --format '{{ .Tag }} {{ .ID }}' | grep $TAG | cut -d ' ' -f 2 | xargs docker image rm
List images and show their architecture:
docker image inspect $(docker images -q) | jq -r '.[] | .RepoTags[0], .Architecture'
or:
docker image inspect $(docker images -q) | jq -c '.[] | { tag: .RepoTags[0], arch: .Architecture }'
or for nicer output:
docker image inspect $(docker images -q) | jq -r '.[] | .RepoTags[0], .Architecture' | paste -d ' ' - - | column -t
Update all local images:
docker image ls -a --format '{{ .Repository }}:{{ .Tag }}' | xargs -I {} docker pull {}
... and remove dangling images:
docker system prune
Get DNS, same as defined in Network Settings (this is Cloudflare DNS):
$ networksetup -getdnsservers Wi-Fi
1.1.1.1
1.0.0.1
2606:4700:4700::1111
2606:4700:4700::1002
Set DNS servers:
networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
See what process connect to internet on my mac:
netstat -anvp tcp | awk '/LISTEN/ {print $9}' | xargs ps -p
netstat -anvp tcp | awk 'NR > 2' | awk '{print $1, $4, $6, $9}' | column -t
emulator -help-all
emulator -accel-check
There are also many help topics hidden in there:
$ emulator -help
<omitted>
-help-disk-images about disk images
-help-debug-tags debug tags for -debug <tags>
-help-char-devices character <device> specification
-help-environment environment variables
-help-virtual-device virtual device management
-help-sdk-images about disk images when using the SDK
-help-build-images about disk images when building Android
-help-all prints all help content
flutter build ipa
build/ios/archive/Runner.xcarchive
- 185MBbuild/ios/ipa/Otwarta Turystyka.ipa
- 35.2MBflutter build ipa --obfuscate --split-debug-info
build/ios/archive/Runner.xcarchive
- 183MBbuild/ios/ipa/Otwarta Turystyka.ipa
- 34.5MBIssue where flutter build ipa
was implemented: https://github.com/flutter/flutter/issues/13065
gh and jq
List all workflows with name containing
test
:List all workflows runs that are in progress:
List all
queued
orin_progress
GitHub Actions runs:List all releases in a private repository:
Delete workflow runs with specific name:
Delete workflow runs with specific name (this works when workflow with the name no longer exists) (jq args syntax):
Get repository creation date:
fzf
This line enlightened me on how
fzf
really works and what it is for:Same as above but "shell completion" style:
Search syntax is described in the README!
Non-interactive use: