diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index f9eb7af..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,46 +0,0 @@ -# remap prefix from ^+A to ^+B (for nested tmux sessions) -unbind C-b -set -g prefix M-f -bind M-f send-prefix - -# nvim 'checkhealth' advice -set-option -g focus-events on -set-option -g default-terminal "screen-256color" -set-option -sa terminal-overrides ',xterm-256color:RGB' - -# enable mouse support for switching panes/windows -# set -g mouse on - -# extend history -set -g history-limit 100000 - -# set vi keybindings -setw -g mode-keys vi -bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" - -# reduce escape time -set-option -sg escape-time 20 - -# pane movement shortcuts -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R - -# window selection -bind -r C-h select-window -t :- -bind -r C-l select-window -t :+ - -# Resize pane shortcuts -bind -r H resize-pane -L 10 -bind -r J resize-pane -D 10 -bind -r K resize-pane -U 10 -bind -r L resize-pane -R 10 - -# split with dash and vbar -bind | split-window -h -c "#{pane_current_path}" -bind - split-window -v -c "#{pane_current_path}" - -# server-tmux only: -# fix ssh agent when tmux is detached -# setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 0c4f009..0000000 --- a/.zshrc +++ /dev/null @@ -1,157 +0,0 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="ys" -# ZSH_THEME="xiong-chiamiov" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(poetry git) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -export EDITOR='nvim' -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" -# default docker -alias doco="docker compose" -# staging -alias docos="docker compose -f docker-compose.staging.yml" - -# use vim bindings -bindkey -v - -# fuzzy-finder -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh - -# make brew accessible -test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" -test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - -# TODO: remove lvim -# set PATH so it includes user's private ~/.local/bin if it exists -# lvim is installed to this directory (at least on ubuntu) -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" -fi - -# zsh completions for lf -fpath=(~/.config/lf $fpath) - -# zsh auto-complete -if type brew &>/dev/null; then - FPATH=$(brew --prefix)/share/zsh-completions:$FPATH - - autoload -Uz compinit - compinit - fi - -# for poetry -fpath+=~/.zfunc -autoload -Uz compinit && compinit - -alias pbpaste="powershell.exe -noprofile Get-Clipboard" -alias pbcopy="clip.exe" - -# on exit from lf this function changes directory to last browser fir in lf -lfcd () { - tmp="$(mktemp)" - lf -last-dir-path="$tmp" "$@" - if [ -f "$tmp" ]; then - dir="$(cat "$tmp")" - rm -f "$tmp" - if [ -d "$dir" ]; then - if [ "$dir" != "$(pwd)" ]; then - cd "$dir" - fi - fi - fi -} diff --git a/README.md b/README.md index 10c51f7..a06316e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da * :art: check for `nvim checkhealth` status * make tmux nice: https://www.youtube.com/watch?v=DzNmUNvnB04 * [fonts](https://www.programmingfonts.org/) - how does this relate to nerdfonts? +* [HN: What's on your home server](https://news.ycombinator.com/item?id=34271167) +* Jetson Nano Developer Kit SD Card Image [link](https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit) +* Raspberry Pi OS Lite (32-bit) [link](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit) ## Windows diff --git a/brewfile b/brewfile deleted file mode 100644 index 35acf0c..0000000 --- a/brewfile +++ /dev/null @@ -1,56 +0,0 @@ -# FOR MACOS -# 1. install bundle with brew: `$brew tap Homebrew/bundle` -# 2. Brew bundle: `$brew bundle` (must be run from same dir as file) -# or `brew bundle --file=~/.private/Brewfile` - -tap "homebrew/cask" -brew "tree" # CLI file tree -# brew "mas" # CLI wrapper for Mac App Store -brew "lf" # CLI file browser (gokcehan/lf/) -brew "diskonaut" # CLI disk usage visual treemap -brew "neovim" # always neovim, no macvim or regular vim -brew "tmux" # terminal multiplexer -brew "f3" # fight flash fraud (USB / SD card checker) -brew "task" # for nvim taskwiki -brew "pyenv" # python environment manager -brew "fzf" # fuzzy-finder -brew "ack" # grep replacer -# brew "handbrake" # video formatting (swap to ffmpeg?) -# brew "mutt" # CLI email cient (muttmua/mutt) -# brew "profanity" # XMPP client - - -# youtube downloader -#"yt-dlp/taps/yt-dlp" - -cask "basictex" # minimal Tex Distribution -# cask "mactex" # LaTeX Live distribution w GUI -# cask "tikzit" # tikz drawing gui -tap "zegervdv/zathura" # pdf-viewer -#cask "zathura" -cask "pgadmin4" # pgsql database admin tool -cask "macsvg" # svg editor -cask "balenaetcher" # burn iso to usb -# cask "karabiner-elements" -cask "telegram" -cask "shiftit" -cask "docker" -cask "vlc" -cask "disk-inventory-x" -cask "rekordbox" -cask "clickup" -cask "visual-studio-code" -cask "discord" -cask "qutebrowser" -# cask "firefox" -cask "waterfox" -cask "inkscape" # svg / pdf editor - -# cask "adium" -# # adium or pidgin? -# cask "pidgin" -# # Cask or brew install pidgin -# cask "fork" - -# terminal -cask "alacritty" # terminaL diff --git a/gist-read-write.ipynb b/gist-read-write.ipynb deleted file mode 100644 index 504bb47..0000000 --- a/gist-read-write.ipynb +++ /dev/null @@ -1,210 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "f2ec458c-c7a2-42ee-8816-b5ea8f8c0759", - "metadata": {}, - "outputs": [], - "source": [ - "# each computer should " - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "2075b6f7-9c53-454b-a6af-818f223f24b4", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "python version: 3.9\n" - ] - }, - { - "data": { - "text/plain": [ - "'id_rsa_mynetwork.pub'" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# %pip install python-dotenv\n", - "# make a new token on:\n", - "# https://github.com/settings/tokens/new\n", - "# scope should only include gist\n", - "'''\n", - "# template .env file\n", - "token='ghp_'\n", - "gist_id='abc...123'\n", - "filename=''\n", - "'''\n", - "\n", - "from dotenv import load_dotenv\n", - "import requests\n", - "import json\n", - "import os\n", - "from pathlib import Path\n", - "import sys\n", - "\n", - "# check python version\n", - "version = sys.version_info\n", - "required_version = (3, 6)\n", - "if not version >= required_version:\n", - " raise EnvironmentError(\n", - " f'detected python version {version} - must be at least 3.6!'\n", - " )\n", - "print(f'python version: {version.major}.{version.minor}')\n", - "\n", - "### write current machiens public key to gist file\n", - "\n", - "# read env vars\n", - "# S/O https://stackoverflow.com/a/61029741\n", - "load_dotenv()\n", - "token = os.getenv('token')\n", - "gist_id = os.getenv('gist_id')\n", - "ssh_filename = os.getenv('filename')\n", - "ssh_filename" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "0e534b35-8b71-4cb1-8dde-0eef9eb6dd36", - "metadata": {}, - "outputs": [], - "source": [ - "# get id_rsa_mynetwork public key\n", - "gist_filename = 'authorized-keys'\n", - "\n", - "\n", - "def append_gist(gist_id, data, append=False):\n", - " # request data\n", - " headers = {'Authorization': f'token {token}'}\n", - " request_url = f'https://api.github.com/gists/{gist_id}' \n", - "\n", - " # get gist contents (all-files)\n", - " request_data = json.dumps({'files':gist_filename})\n", - " r = requests.get(\n", - " url=request_url,\n", - " data=request_data,\n", - " headers=headers)\n", - " gist_content = r.json()\n", - " \n", - " # if gist file exists, get its data\n", - " if gist_filename in gist_content['files'].keys():\n", - " gist_text = gist_content['files'][gist_filename]['content']\n", - " # ... if not, set its data to empty-string\n", - " else:\n", - " gist_text = ''\n", - "\n", - " # if gist already contains data, exit\n", - " if data in gist_text:\n", - " return\n", - "\n", - " # append gist new contents to existing and patch\n", - " content = gist_text + '\\n'+ data\n", - " request_data = json.dumps({'files': {gist_filename: {\"content\": content}}})\n", - " r = requests.patch(\n", - " url=request_url,\n", - " data=request_data,\n", - " headers=headers)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "93ae1879-f245-4478-98fe-0a62e72c00f6", - "metadata": {}, - "outputs": [], - "source": [ - "# get ssh public key\n", - "ssh_pub = Path.home().joinpath(f'.ssh/{ssh_filename}').read_text()\n", - "\n", - "# write ssh key to gist\n", - "append_gist(\n", - " gist_id=gist_id,\n", - " data=ssh_pub)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "fcda799c-3feb-4591-9582-f6187994fe36", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDm6wZlW45N+K24nw6uspMDofP6X+2T11XI8o1Z10gfieX1miJMCaDzlOvATYOKe/bzdkCR7vd8qNyKeJn/cSS95tvOCFi+LjryPzPp1bwuSqZSvtUIb9RD11exlXcXSawVEDmpOOElOiJs7lK7gulB4McIc/Y+ZxrSgo86/mFDOchaE2fWScC/QFVbNRRyuHa2/jlHtQW4ROODJIJXsu9OVMfrTrEdkXuwkNQ6d1KKKC5/IxbvmUtFC0vWEY7vuRVTBgGWv32n9RIhYePbpQeW/l5PwvrE+C3LmCgcQhi7y5NoZNvAoN3wAknQPAGIn0gZ5WukOUGlUkAdRwyJ007kXgiyfMVFV57HioO441rsVFCrOhYcQOMBhmO2a0V/y4aRG1hd0DJY/dBCzh8vVxYMq02h2ta+Sg89uxlcn4DAl5z7KqEkbPFJnLA67xUHvnvOLzKY5PXI7/3m8mbvOleeNGOOiBGRitLT+PbbVRxUg6yxVyL4T9ewOA9uMo0e3tSmaSEMBS2c8DJ4p1GVoFWKm0WqMF3GRWNUyzGEUZqcWblYjssjmx0G9L7lwI8JXHLXrxkhqmZyCE2atag7oWfrUirnQlcPaUX7BgpJbmKPTFK39jiOgij62y7DcbbQwKhSV6Bx8mRjPOaDVJuDKxuW0wIXdW2GY033V8gxPhbdRQ== dth@dth-MacBookAir\\n'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "### fetch gist file content\n", - "\n", - "headers = {'Authorization': f'token {token}'}\n", - "request_url = f'https://api.github.com/gists/{gist_id}' \n", - "request_data = json.dumps({'files':gist_filename})\n", - "r = requests.get(\n", - " url=request_url,\n", - " data=request_data,\n", - " headers=headers)\n", - "gist_content = r.json()['files'][gist_filename]['content']\n", - "gist_content" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "07a9cbfe-8ab1-42d0-9810-cf2b68c97b5d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'94.147.46.129'" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "gist_content" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.13" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/sas-cae.ahk b/sas-cae.ahk deleted file mode 100644 index a3ca434..0000000 --- a/sas-cae.ahk +++ /dev/null @@ -1,116 +0,0 @@ -; this file contains two mods: shift-and-space and control-and-escape - -; shift-and-space script -; source: https://stackoverflow.com/a/39226212 -#InputLevel, 10 ;set send level for the following code to 10 -$Space:: -#InputLevel ;set it back to default value of 0 for any remaining code -now := A_TickCount -while GetKeyState("Space", "P") ; to find out whether space-bar is held - if (A_TickCount-now > 120) ; this time is tested on asker's computer - { - SendInput {Shift Down} - KeyWait, Space - SendInput {Shift Up} - return - } - - -SendInput {Space} ; if key detected to be tapped, send space as per normal -return - - -; control-and-escape script -; source: https://gist.github.com/nocaoper/b872f97cda29bd8f0f2617606abd9fe4 -LShift & Capslock:: -SetCapsLockState, % (State:=!State) ? "on" : "alwaysoff" -Return - -g_AbortSendEsc := false - -#InstallKeybdHook -SetCapsLockState, alwaysoff -Capslock:: -g_DoNotAbortSendEsc := true -Send {LControl Down} -KeyWait, CapsLock -Send {LControl Up} -if ( A_PriorKey = "CapsLock") -{ - if(g_DoNotAbortSendEsc){ - Send {Esc} - } -} -return - -~*^a:: -~*^b:: -~*^c:: -~*^d:: -~*^e:: -~*^f:: -~*^g:: -~*^h:: -~*^i:: -~*^j:: -~*^k:: -~*^l:: -~*^m:: -~*^n:: -~*^o:: -~*^p:: -~*^q:: -~*^r:: -~*^s:: -~*^t:: -~*^u:: -~*^v:: -~*^w:: -~*^x:: -~*^y:: -~*^z:: -~*^1:: -~*^2:: -~*^3:: -~*^4:: -~*^5:: -~*^6:: -~*^7:: -~*^8:: -~*^9:: -~*^0:: -~*^Space:: -~*^Backspace:: -~*^Delete:: -~*^Insert:: -~*^Home:: -~*^End:: -~*^PgUp:: -~*^PgDn:: -~*^Tab:: -~*^Return:: -~*^,:: -~*^.:: -~*^/:: -~*^;:: -~*^':: -~*^[:: -~*^]:: -~*^\:: -~*^-:: -~*^=:: -~*^`:: -~*^F1:: -~*^F2:: -~*^F3:: -~*^F4:: -~*^F5:: -~*^F6:: -~*^F7:: -~*^F8:: -~*^F9:: -~*^F10:: -~*^F11:: -~*^F12:: - g_DoNotAbortSendEsc := false - return diff --git a/server.md b/server.md deleted file mode 100644 index ceb560b..0000000 --- a/server.md +++ /dev/null @@ -1,42 +0,0 @@ -# HOME SERVERS - -## Roadmap -* [ ] read [HN: What'ts on your home server](https://news.ycombinator.com/item?id=34271167) -* [.] auto-setup ssh + ngrok on all machines - * [X] client machines automation - * [X] read ssh commands in [ubuntu](ubuntu.md) - * [X] generate ssh key pair - * [X] ~~write public key to gist~~ - * [X] add ssh public keys to version control `dotfiles/.ssh/authorized_keys` - * [.] server machine - * [X] fetch keys and add to `.ssh/authorized_keys` - * [X] install [ngrok](https://ngrok.com/download) - * [X] setup [ngrok](https://dashboard.ngrok.com/get-started/setup) - * [ ] add make rule to [create ssh-credential](https://ngrok.com/docs/api#api-ssh-credentials) - * [ ] test ssh public key is added to [ngrok API](no-install grok.md) - * [ ] add make-rules to setup ssh - * [ ] setup [ngrok as service](https://stackoverflow.com/a/50808709) - * [ ] test setup - * [ ] install and setup `ngrok` on test machine - * [ ] add authorized keys to version control (?) - * [ ] repurpose [server-ip-sync](server-ip-sync.md) - * [ ] research replacing `ngrok` with [sish](https://github.com/antoniomika/sish) -* [X] set up lenovo machine as thin client - * [ ] run pop os?? -* [ ] keepass get comfy - * [ ] set up keepass on all devices - * [ ] set up ssh keys in keepass -* [.] set up home server cluster - * [ ] setup jetson OS (nvidia distro) - * [ ] Jetson Nano Developer Kit SD Card Image [link](https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit) - * [ ] Mac + Lenovo access - * [.] setup raspberry pi - * [X] install Raspberry Pi OS Lite (32-bit) [link](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit) - * [ ] Mac + Lenovo access - * [ ] setup [sftp](https://linuxconfig.org/how-to-setup-sftp-server-on-ubuntu-22-04-jammy-jellyfish-linux) - * [.] reinstall OS on imac - * [.] obtain CD - * [ ] decide imac purpose - * [ ] decide what OS to run -* [ ] move music collection from e540 to HDD -* [ ] jailbreak iPads