print
is zsh law layer command.
For example it probably build zle command behaviour.
If you master it you will get so beautifule zsh style.
#!/usr/bin/env bash | |
SERVER="$(hostname)" | |
SERVER_HOST_V4="$(curl -4 -s 'https://api.ipengine.dev' | jq -r '.network.ip')" || SERVER_HOST_V4="$(ip route get 8.8.8.8 | grep src | sed 's/.*src \(.* \)/\1/g' | cut -f1 -d ' ')" | |
SERVER_HOST_V6="$(curl -6 -s 'https://api.ipengine.dev' | jq -r '.network.ip')" || SERVER_HOST_V6="$(ip -6 addr | sed -ne 's|^.* inet6 \([^/]*\)/.* scope global.*$|\1|p' | head -1)" | |
SSHPORT='22' | |
DNSPORT='443' | |
apt-get update && apt-get upgrade -y | |
sed -ri -e "s/^#Port.*|^Port.*/Port $SSHPORT/" \ |
Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
#!/bin/bash | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
After installing the keybase command-line tool onto a new / fresh computer, you may want to import your PGP key to the local keyring so that you may use the keys with GPG.
Import your PUBLIC PGP key:
keybase pgp export|gpg --import -
# Commandline args for cloudflared | |
CLOUDFLARED_OPTS=--port 53 --upstream https://1.1.1.1/dns-query https://1.0.0.1/dns-query https://2606:4700:4700::1111/dns-query https://2606:4700:4700::1001/dns-query |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |