From 5af773f93139f09287d60627db850d2265b80fb7 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Mon, 5 Dec 2022 10:15:37 +0200 Subject: [PATCH] SSH signing, wtf config, editorconfig, updates --- .editorconfig | 24 ++++++ Brewfile | 31 +++++--- README.md | 2 +- config/git/config | 20 +++++ config/wtf/config.yml | 180 ++++++++++++++++++++++++++++++++++++++++++ install.sh | 2 +- zshrc | 3 + 7 files changed, 250 insertions(+), 12 deletions(-) create mode 100644 .editorconfig create mode 100644 config/wtf/config.yml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1cdfed3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,24 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +# indent_size = 4 +indent_style = space +insert_final_newline = true +# max_line_length = 160 +# tab_width = 4 +trim_trailing_whitespace = true + +[*.sass] +# indent_size = 2 + +[{*.bash,*.sh,*.zsh}] +indent_size = 2 +tab_width = 2 + +[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}] +# max_line_length = 110 + +[{*.yaml,*.yml}] +indent_size = 2 diff --git a/Brewfile b/Brewfile index 9b1aa11..90d7bd6 100644 --- a/Brewfile +++ b/Brewfile @@ -1,3 +1,4 @@ +tap "1password/tap" tap "anchore/grype" tap "ddosify/tap" tap "dm3ch/tap" @@ -30,10 +31,22 @@ brew "brew-php-switcher" brew "glib" # Manage compile and link flags for libraries brew "pkg-config" -# GNU File, Shell, and Text utilities -brew "coreutils" # Open source suite of directory software brew "openldap" +# Libraries to talk to Microsoft SQL Server and Sybase databases +brew "freetds" +# C/C++ and Java libraries for Unicode and globalization +brew "icu4c" +# Postgres C API library +brew "libpq" +# General-purpose scripting language +brew "php" +# Dependency Manager for PHP +brew "composer" +# GNU File, Shell, and Text utilities +brew "coreutils" +# Diff that understands syntax +brew "difftastic" # Tool for exploring each layer in a docker image brew "dive" # Command-line DNS client @@ -42,8 +55,6 @@ brew "dog" brew "eg-examples" # CLI for templating and/or deploying FaaS functions brew "faas-cli" -# Libraries to talk to Microsoft SQL Server and Sybase databases -brew "freetds" # Monitor a directory for changes and run a shell command brew "fswatch" # GitHub command-line tool @@ -66,8 +77,6 @@ brew "gnutls" brew "gnupg" # Image manipulation brew "netpbm" -# C/C++ and Java libraries for Unicode and globalization -brew "icu4c" # OpenType text shaping engine brew "harfbuzz" # Library to render SVG files using Cairo @@ -90,8 +99,6 @@ brew "imagemagick" brew "jq" # Lazier way to manage everything docker brew "lazydocker" -# Postgres C API library -brew "libpq" # Linguistic software and Finnish dictionary brew "libvoikko" # Swiss Army Knife for macOS @@ -121,13 +128,13 @@ brew "shfmt" # Send macOS User Notifications from the command-line brew "terminal-notifier", link: false # Tool to build, change, and version infrastructure -brew "terraform" +brew "terraform", link: false # Thin wrapper for Terraform e.g. for locking state brew "terragrunt" # Tool which checks for the support of TLS/SSL ciphers and flaws brew "testssl" # Terraform version manager inspired by rbenv -brew "tfenv", link: false +brew "tfenv" # Programmatically correct mistyped console commands brew "thefuck" # Simplified and community-driven man pages @@ -142,6 +149,8 @@ brew "viddy" brew "watch" # Internet file retriever brew "wget" +# Personal information dashboard for your terminal +brew "wtfutil" # Tracks most-used directories to make cd smarter brew "z" # A vulnerability scanner for container images and filesystems @@ -162,6 +171,8 @@ brew "shivammathur/php/php" brew "shivammathur/php/php@7.4" # General-purpose scripting language brew "shivammathur/php/php@8.0" +# Command-line helper for the 1Password password manager +cask "1password-cli" # App to build and share containerized applications and microservices cask "docker" # Reimagine your terminal diff --git a/README.md b/README.md index 612f707..4967679 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Update `Brewfile` ```bash -brew bundle dump --force --file=~/.dotfiles/Brewfile +brew bundle dump --force --file=~/.dotfiles/Brewfile --describe ``` Enable automatic brew updates and upgrades. diff --git a/config/git/config b/config/git/config index 7c91df2..063b0c1 100644 --- a/config/git/config +++ b/config/git/config @@ -1,8 +1,11 @@ [user] name = Ismo Vuorinen email = ismo.vuorinen@vincit.fi + signingkey = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0= + [core] excludesfile = ~/.config/git/gitignore + [alias] reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d @@ -15,13 +18,24 @@ branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'" +[diff] + tool = difftastic + +[difftool] + prompt = false + +[difftool "difftastic"] + cmd = difft "$LOCAL" "$REMOTE" + [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true + [init] defaultBranch = master + [pull] rebase = false @@ -37,3 +51,9 @@ deleted = red bold strike untracked = cyan branch = yellow black bold ul +[gpg] + format = ssh +[gpg "ssh"] + program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign +[commit] + gpgsign = true diff --git a/config/wtf/config.yml b/config/wtf/config.yml new file mode 100644 index 0000000..1705452 --- /dev/null +++ b/config/wtf/config.yml @@ -0,0 +1,180 @@ +wtf: + colors: + background: black + border: + focusable: darkslateblue + focused: orange + normal: gray + checked: yellow + highlight: + fore: black + back: gray + rows: + even: yellow + odd: white + grid: + # How _wide_ the columns are, in terminal characters. In this case we have + # four columns, each of which are 35 characters wide. + columns: [35, 35, 30, 20] + # How _high_ the rows are, in terminal lines. In this case we have four rows + # that support ten line of text and one of four. + rows: [10, 10, 10, 20, 10, 4] + refreshInterval: 1 + openFileUtil: "open" + mods: + # You can have multiple widgets of the same type. + # The "key" is the name of the widget and the type is the actual + # widget you want to implement. + europe_time: + title: "Europe" + type: clocks + colors: + rows: + even: "lightblue" + odd: "white" + enabled: true + locations: + GMT: "Etc/GMT" + Amsterdam: "Europe/Amsterdam" + Berlin: "Europe/Berlin" + Barcelona: "Europe/Madrid" + Copenhagen: "Europe/Copenhagen" + London: "Europe/London" + Rome: "Europe/Rome" + Stockholm: "Europe/Stockholm" + position: + top: 0 + left: 0 + height: 1 + width: 1 + refreshInterval: 15 + sort: "alphabetical" + americas_time: + title: "Americas" + type: clocks + colors: + rows: + even: "lightblue" + odd: "white" + enabled: true + locations: + UTC: "Etc/UTC" + Vancouver: "America/Vancouver" + New_York: "America/New_York" + Sao_Paulo: "America/Sao_Paulo" + Denver: "America/Denver" + Iqaluit: "America/Iqaluit" + Bahamas: "America/Nassau" + Chicago: "America/Chicago" + position: + top: 0 + left: 1 + height: 1 + width: 1 + refreshInterval: 15 + sort: "alphabetical" + battery: + type: power + title: "⚡️" + enabled: true + position: + top: 1 + left: 2 + height: 1 + width: 2 + refreshInterval: 15 + todolist: + type: todo + checkedIcon: "X" + colors: + checked: gray + highlight: + fore: "black" + back: "orange" + enabled: true + filename: "todo.yml" + position: + top: 1 + left: 0 + height: 2 + width: 1 + refreshInterval: 3600 + ip: + type: ipinfo + title: "My IP" + colors: + name: "lightblue" + value: "white" + enabled: true + position: + top: 0 + left: 2 + height: 1 + width: 2 + refreshInterval: 150 + security_info: + type: security + title: "Staying safe" + enabled: true + position: + top: 1 + left: 1 + height: 1 + width: 1 + refreshInterval: 3600 + readme: + type: textfile + enabled: true + filePaths: + - "~/.config/wtf/config.yml" + format: true + formatStyle: "monokai" + position: + top: 3 + left: 0 + height: 1 + width: 1 + refreshInterval: 15 + news: + type: hackernews + title: "HackerNews" + enabled: true + numberOfStories: 10 + position: + top: 3 + left: 1 + height: 1 + width: 3 + storyType: top + refreshInterval: 900 + resources: + type: resourceusage + enabled: true + position: + top: 4 + left: 0 + height: 2 + width: 1 + refreshInterval: 1 + uptime: + type: cmdrunner + args: [] + cmd: "uptime" + enabled: true + position: + top: 5 + left: 1 + height: 1 + width: 3 + refreshInterval: 30 + disks: + type: cmdrunner + cmd: "df" + args: ["-h"] + enabled: true + position: + top: 4 + left: 1 + height: 1 + width: 3 + refreshInterval: 3600 \ No newline at end of file diff --git a/install.sh b/install.sh index 46323e6..1c8f8c5 100644 --- a/install.sh +++ b/install.sh @@ -9,7 +9,7 @@ # env VERBOSE=1 sh install.sh # # DO NOT EDIT THIS FILE -# +# # This file is generated by rcm(7) as: # # rcup -B 0 -g diff --git a/zshrc b/zshrc index 0c1ae48..4c39d60 100644 --- a/zshrc +++ b/zshrc @@ -66,6 +66,9 @@ antigen apply export HIST_STAMPS="yyyy-mm-dd" +# Only load 1Password cli completions if op exists +hash op 2>/dev/null && eval "$(op completion zsh)"; compdef _op op + source "$HOME/.alias" GCLOUD_INSTALL_LOCATION=$(gcloud info --format="value(installation.sdk_root)" --quiet)