mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
refactor: moved articles to the specific section
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -36,6 +36,7 @@
|
||||
"flatpak",
|
||||
"gcloud",
|
||||
"getfacl",
|
||||
"gettext",
|
||||
"gopass",
|
||||
"gpgconf",
|
||||
"gpgtools",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# Mac OS X <!-- omit in toc -->
|
||||
# Mac OS X
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Hidden settings](#hidden-settings)
|
||||
@@ -316,11 +318,17 @@ To use any of these key combinations, press and hold the keys immediately after
|
||||
|
||||
## Further readings
|
||||
|
||||
- [pam_reattach]
|
||||
- [launchctl man page]
|
||||
- [Time Machine]
|
||||
- [`pam_reattach`][pam_reattach]
|
||||
- [`launchctl`'s man page][launchctl man page]
|
||||
- [`macports`][macports]
|
||||
- [`openssl-osx-ca`][openssl-osx-ca]
|
||||
- [Little Snitch]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
- [Boot a Mac from USB Drive]
|
||||
- [Mac startup key combinations]
|
||||
- [Xcode Command Line Tools Installation FAQ]
|
||||
@@ -337,6 +345,12 @@ To use any of these key combinations, press and hold the keys immediately after
|
||||
<!-- project's references -->
|
||||
[mac startup key combinations]: https://support.apple.com/en-us/HT201255
|
||||
|
||||
<!-- internal references -->
|
||||
[time machine]: time%20machine.md
|
||||
[macports]: macports.md
|
||||
[openssl-osx-ca]: openssl-osx-ca.md
|
||||
[little snitch]: little%20snitch.md
|
||||
|
||||
<!-- external references -->
|
||||
[boot a mac from usb drive]: https://www.wikihow.com/Boot-a-Mac-from-USB-Drive
|
||||
[caffeinate your mac]: https://www.theapplegeek.co.uk/blog/caffeinate
|
||||
160
knowledge base/mac os x/macports.md
Normal file
160
knowledge base/mac os x/macports.md
Normal file
@@ -0,0 +1,160 @@
|
||||
# Macports
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Installation](#installation)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL;DR
|
||||
|
||||
Default ports install location is `/opt/local`.
|
||||
|
||||
```sh
|
||||
# Get help on commands.
|
||||
port help 'install'
|
||||
port help 'select'
|
||||
|
||||
# Search for ports.
|
||||
port search 'completion'
|
||||
port search --name 'parallel'
|
||||
|
||||
# Get info on specific ports.
|
||||
port info 'zsh-completions'
|
||||
|
||||
# Get ports' variants.
|
||||
port variants 'k9s'
|
||||
|
||||
# Install ports.
|
||||
sudo port install 'zsh-completions' 'apple-completion'
|
||||
sudo port install 'nmap' -subversion # uses a variant
|
||||
sudo port install -d 'gettext' # debug mode
|
||||
|
||||
# List all installed ports.
|
||||
port installed
|
||||
port echo installed
|
||||
|
||||
# List all ports that have been explicitly installed by the user.
|
||||
port echo requested
|
||||
|
||||
# List all available ports.
|
||||
port list
|
||||
|
||||
# List all versions of specific ports only.
|
||||
port list 'nmap'
|
||||
|
||||
# list all files installed by ports.
|
||||
# The port must be already installed for this to work.
|
||||
port contents 'py38-netaddr'
|
||||
|
||||
# List ports providing a specific file.
|
||||
# The port must be already installed for this to work.
|
||||
port provides '/opt/local/bin/envsubst'
|
||||
|
||||
# Remove ports.
|
||||
sudo port uninstall 'parallel'
|
||||
sudo port uninstall --follow-dependencies 'fzf'
|
||||
|
||||
# List available choices for groups of packages.
|
||||
port select --list 'python'
|
||||
|
||||
# Show the current port selection.
|
||||
port select --summary
|
||||
|
||||
# Set a default version.
|
||||
# Symlinks the "executable"'s version to 'opt/local/bin/executable'.
|
||||
sudo port select --set postgresql postgresql12
|
||||
sudo port select --set python3 python310
|
||||
sudo port select --set virtualenv virtualenv310
|
||||
|
||||
# Update `macports` itself to the latest version.
|
||||
# Also syncs the latest ports definitions.
|
||||
sudo port selfupdate
|
||||
|
||||
# Deactivate active ports.
|
||||
sudo port deactivate 'stow'
|
||||
|
||||
# Activate inactive ports.
|
||||
sudo port activate 'stow'
|
||||
|
||||
# List all outdated ports.
|
||||
port echo outdated
|
||||
|
||||
# Upgrade ports.
|
||||
sudo port upgrade 'tree'
|
||||
|
||||
# Upgrade all outdated ports.
|
||||
sudo port upgrade outdated
|
||||
|
||||
# Clean out all temporary assets of ports.
|
||||
sudo port clean -f --all 'parallel'
|
||||
|
||||
# Clean up leftovers.
|
||||
sudo port reclaim
|
||||
|
||||
# List all inactive ports.
|
||||
# Ports are deactivated when a newer version gets installed.
|
||||
port echo inactive
|
||||
|
||||
# Remove all inactive ports.
|
||||
sudo port uninstall inactive
|
||||
|
||||
# List ports' dependencies.
|
||||
port deps 'chezmoi'
|
||||
|
||||
# Recursively list all ports depending on given ports.
|
||||
port rdeps 'pcre'
|
||||
|
||||
# List the installed ports depending on given ports.
|
||||
port dependents 'bzip2'
|
||||
|
||||
# Recursively list all the installed ports that depend on given ports.
|
||||
port rdependents 'libedit'
|
||||
|
||||
# View ports' notes if any are available.
|
||||
# Notes are displayed right after a port is installed.
|
||||
# The port must be already installed for this to work.
|
||||
port notes 'postgres12'
|
||||
|
||||
# Get the location of ports within the ports tree.
|
||||
port dir 'zlib'
|
||||
|
||||
# Get the location of the tarball of ports.
|
||||
# The port must be already installed for this to work.
|
||||
port location 'readline'
|
||||
|
||||
# Get the location of ports' portfiles.
|
||||
port file 'openssl11'
|
||||
|
||||
# Get the location of the working directory for ports, if it exists.
|
||||
port work 'popt'
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
See the [website] for the installation instructions.
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Website]
|
||||
- Official user [guide]
|
||||
- Public [ports] database
|
||||
- [Mac OS X]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
- [cheat.sh]
|
||||
|
||||
<!-- project's references -->
|
||||
[guide]: https://guide.macports.org/
|
||||
[ports]: https://ports.macports.org/
|
||||
[website]: https://www.macports.org/
|
||||
|
||||
<!-- internal references -->
|
||||
[mac os x]: README.md
|
||||
|
||||
<!-- external references -->
|
||||
[cheat.sh]: https://cheat.sh/port
|
||||
42
knowledge base/mac os x/time machine.md
Normal file
42
knowledge base/mac os x/time machine.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Time Machine
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Follow logs](#follow-logs)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Follow logs.
|
||||
log stream --style 'syslog' \
|
||||
--predicate 'senderImagePath contains[cd] "TimeMachine"' \
|
||||
--info --debug
|
||||
|
||||
# Add or set a destination.
|
||||
sudo tmutil setdestination
|
||||
```
|
||||
|
||||
## Follow logs
|
||||
|
||||
- Use `stream` to keep watching "tail style".
|
||||
- Use `--predicate` to filter out only relevant logs.
|
||||
- Add `--style 'syslog'` to print them out like `syslog` on Linux would.
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Mac OS X]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
|
||||
<!-- project's references -->
|
||||
|
||||
<!-- internal references -->
|
||||
[further readings]: #further-readings
|
||||
[mac os x]: README.md
|
||||
|
||||
<!-- external references -->
|
||||
@@ -1,135 +0,0 @@
|
||||
# Macports
|
||||
|
||||
See the [website] for the installation instructions.
|
||||
|
||||
Default ports install location is `/opt/local`.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# get help on a command
|
||||
port help install
|
||||
port help select
|
||||
|
||||
# search for ports
|
||||
port search completion
|
||||
port search --name parallel
|
||||
|
||||
# get info on a specific port
|
||||
port info zsh-completions
|
||||
|
||||
# get a port's variants
|
||||
port variants k9s
|
||||
|
||||
# install ports
|
||||
sudo port install zsh-completions apple-completion
|
||||
sudo port install nmap -subversion # use a variant
|
||||
sudo port install -d gettext # debug mode
|
||||
|
||||
# list all installed ports
|
||||
port installed
|
||||
port echo installed
|
||||
|
||||
# list all ports that have been explicitly installed by the user
|
||||
port echo requested
|
||||
|
||||
# list all available ports
|
||||
port list
|
||||
port list nmap # limit to all versions of a package
|
||||
|
||||
# list all files installed by a port
|
||||
# the port must be installed for this to work
|
||||
port contents py38-netaddr
|
||||
|
||||
# list ports providing a file
|
||||
# the port must be installed for this to work
|
||||
port provides /opt/local/bin/envsubst
|
||||
|
||||
# remove a port
|
||||
sudo port uninstall --follow-dependencies fzf
|
||||
|
||||
# list available choices for a group
|
||||
port select --list python
|
||||
|
||||
# show the current port selection
|
||||
port select --summary
|
||||
|
||||
# Set a default version.
|
||||
# Symlinks the "executable"'s version to 'opt/local/bin/executable'.
|
||||
sudo port select --set postgresql postgresql12
|
||||
sudo port select --set python3 python310
|
||||
sudo port select --set virtualenv virtualenv310
|
||||
|
||||
# update macports itself to the latest version and sync the latest ports definitions
|
||||
sudo port selfupdate
|
||||
|
||||
# deactivate an active port
|
||||
sudo port deactivate stow
|
||||
# activate an inactive port
|
||||
sudo port activate stow
|
||||
|
||||
# list all outdated ports
|
||||
port echo outdated
|
||||
|
||||
# upgrade a port
|
||||
sudo port upgrade tree
|
||||
|
||||
# upgrade all outdated ports
|
||||
sudo port upgrade outdated
|
||||
|
||||
# clean out all temporary assets of a port
|
||||
sudo port clean -f --all parallel
|
||||
|
||||
# clean up leftovers
|
||||
sudo port reclaim
|
||||
|
||||
# list all inactive ports
|
||||
# ports are deactivated when a newer version gets installed
|
||||
port echo inactive
|
||||
|
||||
# remove all inactive ports
|
||||
sudo port uninstall inactive
|
||||
|
||||
# list a port's dependencies
|
||||
port deps chezmoi
|
||||
|
||||
# recursively list all ports depending on the given port
|
||||
port rdeps pcre
|
||||
|
||||
# list the installed ports depending on the given port
|
||||
port dependents bzip2
|
||||
|
||||
# recursively list all the installed ports that depend on this port
|
||||
port rdependents libedit
|
||||
|
||||
# view a port's notes if any are available
|
||||
# notes are displayed right after a port is installed
|
||||
# the port must be installed for this to work
|
||||
port notes postgres12
|
||||
|
||||
# get the path of a port within the ports tree
|
||||
port dir zlib
|
||||
|
||||
# get the path of the tarball of a port
|
||||
# the port must be installed for this to work
|
||||
port location readline
|
||||
|
||||
# get the path to a port's portfile
|
||||
port file openssl11
|
||||
|
||||
# get the path of the working directory for a port if it exists
|
||||
port work popt
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Website]
|
||||
- Official user [guide]
|
||||
- Public [ports] database
|
||||
- [cheat.sh]
|
||||
|
||||
[guide]: https://guide.macports.org/
|
||||
[ports]: https://ports.macports.org/
|
||||
[website]: https://www.macports.org/
|
||||
|
||||
[cheat.sh]: https://cheat.sh/port
|
||||
@@ -1,17 +0,0 @@
|
||||
# TimeMachine
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# follow logs
|
||||
log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info --debug
|
||||
|
||||
# add or set a destination
|
||||
sudo tmutil setdestination
|
||||
```
|
||||
|
||||
## Follow logs
|
||||
|
||||
- use `stream` to keep watching "tail style"
|
||||
- use `--predicate` to filter out relevant logs
|
||||
- add `--style syslog` to watch them in a syslog style
|
||||
Reference in New Issue
Block a user