diff --git a/legacy/bin/biggest b/legacy/bin/biggest deleted file mode 100755 index 1655ef3..0000000 --- a/legacy/bin/biggest +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/local/bin/nu - -ls | sort-by size | reverse | keep 10 - diff --git a/legacy/bin/biggest-files b/legacy/bin/biggest-files deleted file mode 100755 index 16d10aa..0000000 --- a/legacy/bin/biggest-files +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/local/bin/nu - -ls **/* | where type == File | sort-by size | reverse | keep 10 diff --git a/legacy/bin/docker_cleanup b/legacy/bin/docker_cleanup deleted file mode 100755 index 59cf41d..0000000 --- a/legacy/bin/docker_cleanup +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Stop all containers -if [ "$(docker ps -a -q)" ]; then - echo "Stopping docker containers..." - docker stop "$(docker ps -a -q)" -else - echo "No running docker containers." -fi - -# Remove all stopped containers -if [ "$(docker ps -a -q)" ]; then - echo "Removing docker containers..." - docker rm "$(docker ps -a -q)" -else - echo "No stopped docker containers." -fi - -# Remove all untagged images -if [[ $(docker images | grep "^") ]]; then - docker rmi "$(docker images | grep "^" | awk '{print $3}')" -else - echo "No untagged docker images." -fi - -echo "Cleaned up docker." diff --git a/legacy/bin/jira-checkout b/legacy/bin/jira-checkout deleted file mode 100755 index 69e297c..0000000 --- a/legacy/bin/jira-checkout +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Adapted from: https://seb.jambor.dev/posts/improving-shell-workflows-with-fzf/ -# Requires the following variables to be set: -# - ATLASSIAN_EMAIL -# - ATLASSIAN_API_TOKEN -# - JIRA_HOSTNAME -# - JIRA_PROJECT - -choose_issue() { - jq_template='"\(.key): \(.fields.summary)"' - query="project=$JIRA_PROJECT AND status not in (\"Done\") AND assignee=currentUser()" - - branch_name=$( - curl \ - --data-urlencode "jql=$query" \ - --get \ - --user "$ATLASSIAN_EMAIL:$ATLASSIAN_API_TOKEN" \ - --silent \ - --compressed \ - "https://$JIRA_HOSTNAME/rest/api/2/search" | - jq ".issues[] | $jq_template" | - sed -e 's/"\(.*\)"/\1/' | - fzf \ - --preview='jira-details {1}' \ - --preview-window=top:wrap | - sed -e 's/: /:/' -e 's/[^a-zA-Z0-9:]/-/g' | - awk -F ":" '{printf "%s/%s", $1, tolower($2)}' - ) - - echo "$branch_name" -} - -issue_branch=$(choose_issue) -if [ -n "$issue_branch" ]; then - echo "git checkout -b \"$issue_branch\"" -fi diff --git a/legacy/bin/jira-details b/legacy/bin/jira-details deleted file mode 100755 index 7d73fc5..0000000 --- a/legacy/bin/jira-details +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# Adapted from: https://seb.jambor.dev/posts/improving-shell-workflows-with-fzf/ -# Requires the following variables to be set: -# - ATLASSIAN_EMAIL -# - ATLASSIAN_API_TOKEN -# - JIRA_HOSTNAME -# - JIRA_PROJECT (for other script) - -issue_details() { - jira_key=$(echo "$1" | cut -d":" -f1) - jq_template='"'\ -'# \(.key): \(.fields.summary)\n'\ -'\n'\ -'*Created*: \(.fields.created)\n'\ -'*Status*: \(.fields.status.statusCategory.name)\n'\ -'*Reporter*: \(.fields.reporter.displayName)\n'\ -'*Priority*: \(.fields.priority.name)\n'\ -"*Epic*: https://$JIRA_HOSTNAME/browse/\(.fields.customfield_10014)\n"\ -'\n'\ -'## Link\n\n'\ -"https://$JIRA_HOSTNAME/browse/\(.key)\n"\ -'\n'\ -'## Description\n\n'\ -'\(.fields.description)'\ -'"' - curl \ - --get \ - --user "$ATLASSIAN_EMAIL:$ATLASSIAN_API_TOKEN" \ - --silent \ - --compressed \ - "https://$JIRA_HOSTNAME/rest/api/2/issue/$jira_key" | - jq "$jq_template" | - xargs printf | - bat -l md --color always --style plain -} - -issue_details "$1" diff --git a/legacy/bin/kube-dashboard b/legacy/bin/kube-dashboard deleted file mode 100755 index 73542fd..0000000 --- a/legacy/bin/kube-dashboard +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -kubectl -n kube-system get secret "$( - kubectl -n kube-system get secret | - grep dashboard-admin | - awk '{print $1}' -)" -o json | - jq -j --raw-output '.data.token' | - base64 --decode | - pbcopy - -open http://localhost:8001/api/v1/namespaces/default/services/https:kubernetes-dashboard:https/proxy/#!/login - -kubectl proxy diff --git a/legacy/bin/newest b/legacy/bin/newest deleted file mode 100755 index 5d33ea8..0000000 --- a/legacy/bin/newest +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/local/bin/nu - -ls | sort-by modified | reverse | keep 5 diff --git a/legacy/bin/oldest b/legacy/bin/oldest deleted file mode 100755 index a9cc938..0000000 --- a/legacy/bin/oldest +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/local/bin/nu - -ls | sort-by modified | keep 5 diff --git a/legacy/bin/pod b/legacy/bin/pod deleted file mode 100755 index c1d491a..0000000 --- a/legacy/bin/pod +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# Credit: https://github.com/junegunn/fzf/blob/master/ADVANCED.md - -read -ra tokens < <( - kubectl get pods --all-namespaces | - fzf --info=inline --layout=reverse --header-lines=1 --border \ - --prompt "$(kubectl config current-context | sed 's/-context$//')> " \ - --header $'Press CTRL-O to open log in editor\n\n' \ - --bind ctrl-/:toggle-preview \ - --bind "ctrl-o:execute:${EDITOR:-vim} <(kubectl logs --namespace {1} {2}) > /dev/tty" \ - --preview-window up,follow \ - --preview 'kubectl logs --follow --tail=100000 --namespace {1} {2}' "$@" -) -[ ${#tokens} -gt 1 ] && - kubectl exec -it --namespace "${tokens[0]}" "${tokens[1]}" -- /bin/sh diff --git a/legacy/bin/symlinks b/legacy/bin/symlinks deleted file mode 100755 index 71cd0c2..0000000 --- a/legacy/bin/symlinks +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/local/bin/nu - -ls -al | where type == Symlink | select name target diff --git a/legacy/bin/url-decode b/legacy/bin/url-decode deleted file mode 100755 index 10a20ae..0000000 --- a/legacy/bin/url-decode +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } - -urldecode "$@" diff --git a/legacy/newsboat/com.noah.newsboat.plist b/legacy/newsboat/com.noah.newsboat.plist deleted file mode 100644 index 1c19f9c..0000000 --- a/legacy/newsboat/com.noah.newsboat.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Label - com.noah.newsboat - - ProgramArguments - - /usr/local/bin/newsboat -x reload - - - Nice - 1 - - StartInterval - 1800 - - RunAtLoad - - - StandardErrorPath - /tmp/newsboat.err - - StandardOutPath - /tmp/newsboat.out - - diff --git a/legacy/newsboat/config b/legacy/newsboat/config deleted file mode 100644 index ecd3aba..0000000 --- a/legacy/newsboat/config +++ /dev/null @@ -1,40 +0,0 @@ -browser "$BROWSER %u" -prepopulate-query-feeds yes -feed-sort-order lastupdated -reload-only-visible-feeds yes -text-width 72 - -bind-key j down -bind-key k up -bind-key j next articlelist -bind-key k prev articlelist -bind-key G end -bind-key g home -bind-key d pagedown -bind-key u pageup -bind-key n next-unread -bind-key p prev-unread -bind-key ; macro-prefix -bind-key B bookmark -bind-key f edit-flags - -macro v set browser "mpv %u"; open-in-browser; set browser "$BROWSER %u" -macro p set browser "echo %u"; one; set browser "$BROWSER %u" -macro H set browser "clx view $(echo %u | cut -d '=' -f2)"; one; set browser "$BROWSER %u" -macro h set browser "clx view $(echo %u | cut -d '=' -f2)"; two; set browser "$BROWSER %u" -macro w set browser "w3m -o confirm_qq=false %u"; open-in-browser; set browser "$BROWSER %u" -macro r set browser "url-markdown %u | glow -p -w 72 -"; open-in-browser; set browser "$BROWSER %u" -macro d set browser "youtube-dl -o ~/Downloads/%(title)s.%(ext)s %u &"; open-in-browser-noninteractively; set browser "$BROWSER %u" -macro n set-tag News; reload-all -macro a set-tag All -macro e set-tag Reddit; reload-all -macro y set-tag YouTube; reload-all - -bookmark-cmd "bookmark" - -highlight article "^(Feed|Title|Author|Link|Date):.*" color243 default -highlight article "^(Links):.*" color243 default -highlight article "^(\\[[0-9]+\\]):.*" color243 default -highlight article "^(\\[[0-9]+\\])" color243 default -highlight article "^\\[.*\\]$" color243 default -highlight article "^(Title:).*" color249 default diff --git a/legacy/nix-env.fish b/legacy/nix-env.fish deleted file mode 100644 index b84fba0..0000000 --- a/legacy/nix-env.fish +++ /dev/null @@ -1,137 +0,0 @@ -# Setup Nix - -# We need to distinguish between single-user and multi-user installs. -# This is difficult because there's no official way to do this. -# We could look for the presence of /nix/var/nix/daemon-socket/socket but this will fail if the -# daemon hasn't started yet. /nix/var/nix/daemon-socket will exist if the daemon has ever run, but -# I don't think there's any protection against accidentally running `nix-daemon` as a user. -# We also can't just look for /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh because -# older single-user installs used the default profile instead of a per-user profile. -# We can still check for it first, because all multi-user installs should have it, and so if it's -# not present that's a pretty big indicator that this is a single-user install. If it does exist, -# we still need to verify the install type. To that end we'll look for a root owner and sticky bit -# on /nix/store. Multi-user installs set both, single-user installs don't. It's certainly possible -# someone could do a single-user install as root and then manually set the sticky bit but that -# would be extremely unusual. - -set -l nix_profile_path /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh -set -l single_user_profile_path ~/.nix-profile/etc/profile.d/nix.sh -if test -e $nix_profile_path - # The path exists. Double-check that this is a multi-user install. - # We can't just check for ~/.nix-profile/… because this may be a single-user install running as - # the wrong user. - - # stat is not portable. Splitting the output of ls -nd is reliable on most platforms. - set -l owner (string split -n ' ' (command ls -nd /nix/store 2>/dev/null))[3] - if not test -k /nix/store -a $owner -eq 0 - # /nix/store is either not owned by root or not sticky. Assume single-user. - set nix_profile_path $single_user_profile_path - end -else - # The path doesn't exist. Assume single-user - set nix_profile_path $single_user_profile_path -end - -if test -e $nix_profile_path - # Source the nix setup script - # We're going to run the regular Nix profile under bash and then print out a few variables - for line in (command env -u BASH_ENV bash -c '. "$0"; for name in PATH "${!NIX_@}"; do printf "%s=%s\0" "$name" "${!name}"; done' $nix_profile_path | string split0) - set -xg (string split -m 1 = $line) - end - - # Insert Nix's fish share directories into fish's special variables. - # nixpkgs-installed fish tries to set these up already if NIX_PROFILES is defined, which won't - # be the case when sourcing $__fish_data_dir/share/config.fish normally, but might be for a - # recursive invocation. To guard against that, we'll only insert paths that don't already exit. - # Furthermore, for the vendor_conf.d sourcing, we'll use the pre-existing presence of a path in - # $fish_function_path to determine whether we want to source the relevant vendor_conf.d folder. - - # To start, let's locally define NIX_PROFILES if it doesn't already exist. - set -al NIX_PROFILES - if test (count $NIX_PROFILES) -eq 0 - set -a NIX_PROFILES $HOME/.nix-profile - end - # Replicate the logic from nixpkgs version of $__fish_data_dir/__fish_build_paths.fish. - set -l __nix_profile_paths (string split ' ' -- $NIX_PROFILES)[-1..1] - set -l __extra_completionsdir \ - $__nix_profile_paths/etc/fish/completions \ - $__nix_profile_paths/share/fish/vendor_completions.d - set -l __extra_functionsdir \ - $__nix_profile_paths/etc/fish/functions \ - $__nix_profile_paths/share/fish/vendor_functions.d - set -l __extra_confdir \ - $__nix_profile_paths/etc/fish/conf.d \ - $__nix_profile_paths/share/fish/vendor_conf.d - ### Configure fish_function_path ### - # Remove any of our extra paths that may already exist. - # Record the equivalent __extra_confdir path for any function path that exists. - set -l existing_conf_paths - for path in $__extra_functionsdir - if set -l idx (contains --index -- $path $fish_function_path) - set -e fish_function_path[$idx] - set -a existing_conf_paths $__extra_confdir[(contains --index -- $path $__extra_functionsdir)] - end - end - # Insert the paths before $__fish_data_dir. - if set -l idx (contains --index -- $__fish_data_dir/functions $fish_function_path) - # Fish has no way to simply insert into the middle of an array. - set -l new_path $fish_function_path[1..$idx] - set -e new_path[$idx] - set -a new_path $__extra_functionsdir - set fish_function_path $new_path $fish_function_path[$idx..-1] - else - set -a fish_function_path $__extra_functionsdir - end - - ### Configure fish_complete_path ### - # Remove any of our extra paths that may already exist. - for path in $__extra_completionsdir - if set -l idx (contains --index -- $path $fish_complete_path) - set -e fish_complete_path[$idx] - end - end - # Insert the paths before $__fish_data_dir. - if set -l idx (contains --index -- $__fish_data_dir/completions $fish_complete_path) - set -l new_path $fish_complete_path[1..$idx] - set -e new_path[$idx] - set -a new_path $__extra_completionsdir - set fish_complete_path $new_path $fish_complete_path[$idx..-1] - else - set -a fish_complete_path $__extra_completionsdir - end - - ### Source conf directories ### - # The built-in directories were already sourced during shell initialization. - # Any __extra_confdir that came from $__fish_data_dir/__fish_build_paths.fish was also sourced. - # As explained above, we're using the presence of pre-existing paths in $fish_function_path as a - # signal that the corresponding conf dir has also already been sourced. - # In order to simulate this, we'll run through the same algorithm as found in - # $__fish_data_dir/config.fish except we'll avoid sourcing the file if it comes from an - # already-sourced location. - # Caveats: - # * Files will be sourced in a different order than we'd ideally do (because we're coming in - # after the fact to source them). - # * If there are existing extra conf paths, files in them may have been sourced that should have - # been suppressed by paths we're inserting in front. - # * Similarly any files in $__fish_data_dir/vendor_conf.d that should have been suppressed won't - # have been. - set -l sourcelist - for file in $__fish_config_dir/conf.d/*.fish $__fish_sysconf_dir/conf.d/*.fish - # We know these paths were sourced already. Just record them. - set -l basename (string replace -r '^.*/' '' -- $file) - contains -- $basename $sourcelist - or set -a sourcelist $basename - end - for root in $__extra_confdir - for file in $root/*.fish - set -l basename (string replace -r '^.*/' '' -- $file) - contains -- $basename $sourcelist - and continue - set -a sourcelist $basename - contains -- $root $existing_conf_paths - and continue # this is a pre-existing path, it will have been sourced already - [ -f $file -a -r $file ] - and source $file - end - end -end diff --git a/legacy/scripts/configure_macos b/legacy/scripts/configure_macos deleted file mode 100755 index 1bd8e00..0000000 --- a/legacy/scripts/configure_macos +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/sh - -echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)" -defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 - -echo "Automatically show and hide the dock" -defaults write com.apple.dock autohide -bool true - -echo "Automatically show and hide the menu bar" -defaults write NSGlobalDomain _HIHideMenuBar -bool true - -echo "Make Dock icons of hidden applications translucent" -defaults write com.apple.dock showhidden -bool true - -echo "Use current directory as default search scope in Finder" -defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" - -echo "Expand save panel by default" -defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true - -echo "Expand print panel by default" -defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true - -echo "Disable the \"Are you sure you want to open this application?\" dialog" -defaults write com.apple.LaunchServices LSQuarantine -bool false - -echo "Enable highlight hover effect for the grid view of a stack (Dock)" -defaults write com.apple.dock mouse-over-hilte-stack -bool true - -echo "Enable spring loading for all Dock items" -defaults write enable-spring-load-actions-on-all-items -bool true - -echo "Disable press-and-hold for keys in favor of key repeat" -defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false -defaults write -g ApplePressAndHoldEnabled -bool false - -echo "Set a blazingly fast keyboard repeat rate" -defaults write NSGlobalDomain KeyRepeat -int 2 - -echo "Set a shorter Delay until key repeat" -defaults write NSGlobalDomain InitialKeyRepeat -int 12 - -echo "Disable disk image verification" -defaults write com.apple.frameworks.diskimages skip-verify -bool true -defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true -defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true - -echo "Avoid creating .DS_Store files on network volumes" -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true - -echo "Disable the warning when changing a file extension" -defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false - -# echo "Enable snap-to-grid for desktop icons" -# /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist - -echo "Disable the warning before emptying the Trash" -defaults write com.apple.finder WarnOnEmptyTrash -bool false - -echo "Disable tap to click (Trackpad)" -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool false - -echo "Enable Safari’s debug menu" -defaults write com.apple.Safari IncludeInternalDebugMenu -bool true - -echo "Make Safari’s search banners default to Contains instead of Starts With" -defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false - -echo "Add a context menu item for showing the Web Inspector in web views" -defaults write NSGlobalDomain WebKitDeveloperExtras -bool true - -echo "Save to disk (not to iCloud) by default" -defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false - -echo "Disable automatic capitalization as it’s annoying when typing code" -defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false - -echo "Disable smart dashes as they’re annoying when typing code" -defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false - -echo "Disable automatic period substitution as it’s annoying when typing code" -defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false - -echo "Disable smart quotes as they’re annoying when typing code" -defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false - -echo "Disable auto-correct" -defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false - -echo "Use scroll gesture with the Ctrl (^) modifier key to zoom" -defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true -defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 -echo "Follow the keyboard focus while zoomed in" -defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true - -echo "Require password immediately after sleep or screen saver begins" -defaults write com.apple.screensaver askForPassword -int 1 -defaults write com.apple.screensaver askForPasswordDelay -int 0 - -echo "Save screenshots to downloads" -defaults write com.apple.screencapture location -string "${HOME}/Downloads" - -echo "Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons" -defaults write com.apple.finder QuitMenuItem -bool true - -echo "Show the ~/Library folder" -chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library - -# Noah Prefs -echo "Enable dock magnification" -defaults write com.apple.dock magnification -bool true - -echo "Set dock size" -defaults write com.apple.dock largesize -int 48 -defaults write com.apple.dock tilesize -int 44 - -echo "Choose and order dock icons" -__dock_item() { - printf '%s%s%s%s%s' \ - 'tile-datafile-data' \ - '_CFURLString' \ - "$1" \ - '_CFURLStringType0' \ - '' -} - -defaults write com.apple.dock persistent-apps -array \ - "$(__dock_item /Applications/1Password\ 7.app)" \ - "$(__dock_item /Applications/Slack.app)" \ - "$(__dock_item /System/Applications/Calendar.app)" \ - "$(__dock_item /Applications/Firefox.app)" \ - "$(__dock_item /System/Applications/Messages.app)" \ - "$(__dock_item /System/Applications/Mail.app)" \ - "$(__dock_item /Applications/Mimestream.app)" \ - "$(__dock_item /Applications/zoom.us.app)" \ - "$(__dock_item /Applications/Obsidian.app)" \ - "$(__dock_item /Applications/Alacritty.app)" \ - "$(__dock_item /System/Applications/System\ Preferences.app)" - -echo "No recent items in dock" -defaults write com.apple.dock show-recents -bool FALSE - -echo "Switch to dark mode" -defaults write "Apple Global Domain" "AppleInterfaceStyle" "Dark" - -echo "Turn on Scroll Reverser" -open /Applications/Scroll\ Reverser.app -osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Scroll Reverser.app", hidden:false}' - -echo "Allow apps from anywhere" -SPCTL=$(spctl --status) -if ! [ "$SPCTL" = "assessments disabled" ] -then - sudo spctl --master-disable -fi - -# --- - -echo "Reset Launchpad" -# [ -e ~/Library/Application\ Support/Dock/*.db ] && rm ~/Library/Application\ Support/Dock/*.db -rm ~/Library/Application\ Support/Dock/*.db - -echo "Show the ~/Library folder" -chflags nohidden ~/Library - -# Clean up -echo "Kill affected applications" -for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done diff --git a/legacy/scripts/npm b/legacy/scripts/npm deleted file mode 100755 index 2ad7268..0000000 --- a/legacy/scripts/npm +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -npm update -g -npm install -g pyright -npm install -g diagnostic-languageserver diff --git a/legacy/scripts/rust b/legacy/scripts/rust deleted file mode 100755 index 2456f0b..0000000 --- a/legacy/scripts/rust +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -install_rust() { - if ! (which ~/.cargo/bin/rustup > /dev/null) - then - echo "installing rustup" - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - fi - - echo "rustup ✓" -} - -update_rust() { - ~/.cargo/bin/rustup update > /dev/null 2>&1 - rust_version=$(~/.cargo/bin/rustc --version | awk '{print $2}') - - echo "latest rust: $rust_version ✓" -} - -download_rust_analyzer() { - if ! (which rust-analyzer > /dev/null) - then - echo "downloading rust analyzer" - rust_analyzer_bin=/usr/local/bin/rust-analyzer - curl -s -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-mac -o $rust_analyzer_bin - chmod +x $rust_analyzer_bin - fi - - echo "rust-analyzer ✓" -} - -# cargo-edit: quickly add and remove packages -# whatfeatures: see optional features for a package -install_cargos() { - set -- \ - 'cargo-edit' \ - 'cargo-whatfeatures' - for program do - cargo install "$program" - done - - echo "cargos ✓" -} - -install_rust -update_rust -download_rust_analyzer -install_cargos diff --git a/legacy/scripts/setup_cheatsheet b/legacy/scripts/setup_cheatsheet deleted file mode 100755 index e10058c..0000000 --- a/legacy/scripts/setup_cheatsheet +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -echo "downloading cheatsheet" -curl https://cht.sh/:cht.sh > ~/.local/bin/cheat -chmod 755 ~/.local/bin/cheat -echo "cheatsheet ✓" diff --git a/legacy/scripts/setup_fish b/legacy/scripts/setup_fish deleted file mode 100755 index 269833d..0000000 --- a/legacy/scripts/setup_fish +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env fish - -set -U FISH_DIR (readlink ~/.config/fish) # Used for getting to this repo -set -Ux DOTS (dirname $FISH_DIR) # Directory of this config repo -set -U CDPATH . $HOME # Directories available for immediate cd -set -Ux EDITOR nvim # Preferred text editor -set -U PROJ $HOME/dev/work # Projects directory -set -Ux NOTES_PATH "$HOME/dev/personal/notes" # Notes directory -set -Ux MANPAGER "nvim +Man!" # Used for reading man pages -set -Ux DIRENV_LOG_FORMAT "" # Disable direnv output -set -Ux BROWSER "/Applications/Firefox.app/Contents/MacOS/firefox" - -# Load abbreviations -abbrs - -# Turn off greeting -set -U fish_greeting "" - -# Set colors (Base16 Eighties) -set -U fish_color_normal normal -set -U fish_color_command 99cc99 -set -U fish_color_quote ffcc66 -set -U fish_color_redirection d3d0c8 -set -U fish_color_end cc99cc -set -U fish_color_error f2777a -set -U fish_color_selection white --bold --background=brblack -set -U fish_color_search_match bryellow --background=brblack -set -U fish_color_history_current --bold -set -U fish_color_operator 6699cc -set -U fish_color_escape 66cccc -set -U fish_color_cwd green -set -U fish_color_cwd_root red -set -U fish_color_valid_path --underline -set -U fish_color_autosuggestion 747369 -set -U fish_color_user brgreen -set -U fish_color_host normal -set -U fish_color_cancel -r -set -U fish_pager_color_completion normal -set -U fish_pager_color_description B3A06D yellow -set -U fish_pager_color_prefix white --bold --underline -set -U fish_pager_color_progress brwhite --background=cyan -set -U fish_color_comment ffcc66 -set -U fish_color_param d3d0c8 -set -U fish_color_match 6699cc - -echo "fish setup ✓" diff --git a/legacy/scripts/setup_ytfzf b/legacy/scripts/setup_ytfzf deleted file mode 100755 index 0408a3a..0000000 --- a/legacy/scripts/setup_ytfzf +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -echo "downloading ytfzf" -mkdir -p ~/.local/bin -curl -sL "https://raw.githubusercontent.com/pystardust/ytfzf/master/ytfzf" >~/.local/bin/ytfzf -chmod 755 ~/.local/bin/ytfzf -echo "ytfzf ✓" diff --git a/legacy/templates/kubernetes/clusterrole.yaml b/legacy/templates/kubernetes/clusterrole.yaml deleted file mode 100644 index 10fc326..0000000 --- a/legacy/templates/kubernetes/clusterrole.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: -rules: - - apiGroups: [""] - resources: - verbs: [] diff --git a/legacy/templates/kubernetes/clusterrolebinding.yaml b/legacy/templates/kubernetes/clusterrolebinding.yaml deleted file mode 100644 index 3d5095e..0000000 --- a/legacy/templates/kubernetes/clusterrolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: -subjects: -- kind: ServiceAccount - name: - namespace: default diff --git a/legacy/templates/kubernetes/configmap.yaml b/legacy/templates/kubernetes/configmap.yaml deleted file mode 100644 index 0dfc20a..0000000 --- a/legacy/templates/kubernetes/configmap.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: - namespace: default - annotations: - replicator.v1.mittwald.de/replicate-to: ".*" -data: diff --git a/legacy/templates/kubernetes/deployment.yaml b/legacy/templates/kubernetes/deployment.yaml deleted file mode 100644 index 204bcfc..0000000 --- a/legacy/templates/kubernetes/deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: - namespace: default -spec: - replicas: 1 - selector: - matchLabels: - app: - template: - metadata: - labels: - app: - spec: - serviceAccountName: - containers: - - name: - image: - imagePullPolicy: Always - envFrom: - - configMapRef: - name: - - secretRef: - name: - ports: - - containerPort: - protocol: TCP - resources: - limits: - cpu: - requests: - cpu: diff --git a/legacy/templates/kubernetes/ingress.yaml b/legacy/templates/kubernetes/ingress.yaml deleted file mode 100644 index df7b928..0000000 --- a/legacy/templates/kubernetes/ingress.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: networking.k8s.io/v1beta1 # must be beta until k8s 1.19 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: alb - alb.ingress.kubernetes.io/group.name: - alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]' - alb.ingress.kubernetes.io/scheme: internet-facing - alb.ingress.kubernetes.io/security-groups: - alb.ingress.kubernetes.io/tags: Project= - alb.ingress.kubernetes.io/target-type: instance - name: - namespace: -spec: - rules: - - host: - http: - paths: - - backend: - serviceName: - servicePort: diff --git a/legacy/templates/kubernetes/role.yaml b/legacy/templates/kubernetes/role.yaml deleted file mode 100644 index 395080d..0000000 --- a/legacy/templates/kubernetes/role.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: - namespace: default -rules: -- apiGroups: [""] - resourceNames: - resources: - verbs: diff --git a/legacy/templates/kubernetes/rolebinding.yaml b/legacy/templates/kubernetes/rolebinding.yaml deleted file mode 100644 index 6fcb96c..0000000 --- a/legacy/templates/kubernetes/rolebinding.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: - namespace: default -roleRef: - kind: - name: - apiGroup: rbac.authorization.k8s.io -subjects: -- kind: - name: - apiGroup: rbac.authorization.k8s.io diff --git a/legacy/templates/kubernetes/secret.yaml b/legacy/templates/kubernetes/secret.yaml deleted file mode 100644 index a8025a0..0000000 --- a/legacy/templates/kubernetes/secret.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: - namespace: default - annotations: - replicator.v1.mittwald.de/replicate-to: ".*" -data: diff --git a/legacy/templates/kubernetes/service.yaml b/legacy/templates/kubernetes/service.yaml deleted file mode 100644 index e375f08..0000000 --- a/legacy/templates/kubernetes/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - alb.ingress.kubernetes.io/healthcheck-path: - name: - namespace: default -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 80 - selector: - app: - type: NodePort diff --git a/legacy/templates/kubernetes/serviceaccount.yaml b/legacy/templates/kubernetes/serviceaccount.yaml deleted file mode 100644 index 1c89f57..0000000 --- a/legacy/templates/kubernetes/serviceaccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: - namespace: default diff --git a/legacy/templates/programs/skeleton.py b/legacy/templates/programs/skeleton.py deleted file mode 100644 index 395f57d..0000000 --- a/legacy/templates/programs/skeleton.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -""" -Program -""" - -def main(): - """Run the program""" - pass - -if __name__ == "__main__": - main() diff --git a/legacy/templates/programs/skeleton.sh b/legacy/templates/programs/skeleton.sh deleted file mode 100644 index 1e5bc66..0000000 --- a/legacy/templates/programs/skeleton.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then - cat <