Replacing the default FreeBSD system mailer Sendmail with Postfix using SMTP AUTH, acting as mail client
# pkg install postfix-sasl1
Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y2
# service sendmail stop
| git config --global alias.skip-ci '!git reset && COMMIT_MSG=`git show --format=format:%B -s` && git commit --allow-empty --amend -m "[skip ci] $COMMIT_MSG"' |
| extension AVAsset { | |
| func videoOrientation() -> (orientation: UIInterfaceOrientation, device: AVCaptureDevicePosition) { | |
| var orientation: UIInterfaceOrientation = .Unknown | |
| var device: AVCaptureDevicePosition = .Unspecified | |
| let tracks :[AVAssetTrack] = self.tracksWithMediaType(AVMediaTypeVideo) | |
| if let videoTrack = tracks.first { | |
| let t = videoTrack.preferredTransform |
| #!/usr/bin/env bash | |
| # Runs a command wrapped in btrfs snapper pre-post snapshots. | |
| # Usage: $ snp <commands> | |
| # e.g.: $ snp pacman -Syyu | |
| # Requirements: snapper (https://wiki.archlinux.org/title/snapper) | |
| # The latest version of this script is hosted at https://gist.github.com/erikw/5229436 | |
| log_path="/var/local/log/snp" | |
| date=$(date "+%Y-%m-%d-%H%M%S") | |
| log_file="${log_path}/snp_${date}.log" |
| #!/usr/bin/env ruby -w | |
| ## Using ruby's standard OptionParser to get subcommand's in command line arguments | |
| ## Note you cannot do: opt.rb help command | |
| ## other options are commander, main, GLI, trollop... | |
| # run it as | |
| # ruby opt.rb --help | |
| # ruby opt.rb foo --help | |
| # ruby opt.rb foo -q | |
| # etc |