1
mirror of https://github.com/jakejarvis/dotfiles.git synced 2025-09-15 23:15:30 -04:00

commit nanorc config

This commit is contained in:
2023-01-05 14:16:34 -05:00
parent eeb1f2092c
commit 2f51d538a5
13 changed files with 107 additions and 47 deletions

View File

@@ -11,7 +11,7 @@ export ZSH=$HOME/.oh-my-zsh
export EDITOR="nano"
export VISUAL="code"
# export BROWSER="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
export BROWSER="/Applications/Firefox.app/Contents/MacOS/firefox"
# export BROWSER="/Applications/Firefox.app/Contents/MacOS/firefox"
# Adjust history for speed
HISTFILE=~/.zsh_history

View File

@@ -64,6 +64,17 @@ alias dcd="docker-compose down"
alias dcr="docker-compose down && docker-compose up -d"
alias dcl="docker-compose logs -f"
# Multipass
alias mp="multipass"
mpl() {
# creates VM and opens its bash shell
# `mpl test1 20.04`
multipass launch ${2:-22.04} --cpus 4 --mem 4G --disk 20G --name "$1" && \
multipass shell "$1"
}
alias mpd="multipass delete"
alias mps="multipass shell"
# Node/NPM/Yarn
alias npr="npm run"
alias fresh_npm="rm -rf node_modules package-lock.json && npm install"
@@ -94,6 +105,9 @@ alias moshalt="mosh --ssh=\"ssh -p 2222\""
alias pubkey="more ~/.ssh/id_ed25519.pub | pbcopy | echo '=> Public key copied to clipboard.'"
alias pubkey_rsa="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to clipboard.'"
# Tailscale: https://tailscale.com/kb/1080/cli/?tab=macos
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
# youtube-dl
alias ytdl="youtube-dl -f bestvideo+bestaudio"
alias ytmp3="youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 320K"

View File

@@ -49,7 +49,7 @@ gitio() {
# https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc
push_ssh_cert() {
local _host
test -f ~/.ssh/id_ed25519.pub || ssh-keygen -t ed25519
[ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519
for _host in "$@";
do
echo $_host

View File

@@ -1,12 +1,12 @@
# Rosetta hacks for M1 Macs
alias intel="arch -x86_64 /bin/zsh"
alias arm="arch -arm64 /opt/homebrew/bin/zsh"
alias arm="arch -arm64 "$HOMEBREW_PREFIX"/bin/zsh"
# My own creation! See: https://github.com/jakejarvis/simpip
alias ipv4="curl -4 simpip.com --max-time 1 --proto-default https --silent"
alias ipv6="curl -6 simpip.com --max-time 1 --proto-default https --silent"
alias ip="ipv4; ipv6"
alias iploc="ipconfig getifaddr en0"
alias ip-local="ipconfig getifaddr en0"
alias ips="ip; ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
alias dns-clear="networksetup -setdnsservers Wi-Fi"
@@ -28,27 +28,30 @@ system_update() {
brew upgrade $(brew outdated --greedy --verbose | awk '$2 !~ /(latest)/ {print $1}')
brew cleanup
echo -e "${YELLOW}Updating NPM/Yarn packages...${NC}"
volta install node@latest
volta install npm@8
echo -e "${YELLOW}Updating global NPM/Yarn packages...${NC}"
volta fetch node@latest
volta install node@lts
volta install yarn@1
volta run --node latest --npm 8 --no-yarn -- npm update --global
volta run --node latest --yarn 1 -- yarn global upgrade
volta run --node lts --no-yarn -- npm update --global
volta run --node lts --yarn 1 -- yarn global upgrade
echo -e "${YELLOW}Updating Ruby gems...${NC}"
gem update --system
echo -e "${YELLOW}Updating Ruby and gems...${NC}"
CONFIGURE_OPTS="$RUBY_CONFIGURE_OPTS" \
rbenv install --skip-existing $(rbenv install -l | grep -v - | tail -1) && \
rbenv global $(rbenv install -l | grep -v - | tail -1)
gem install bundler foreman
gem update
# gem upgrade --user-install
gem cleanup
rbenv rehash
# https://stackoverflow.com/a/3452888
echo -e "${YELLOW}Updating pip packages...${NC}"
pip3 list --outdated --format=json | jq -r '.[] | .name+"="+.latest_version' | cut -d = -f 1 | xargs -n1 pip3 install -U
echo -e "${YELLOW}Updating MAS apps...${NC}"
echo -e "${YELLOW}Checking for App Store updates...${NC}"
mas outdated
echo -e "${YELLOW}Check for macOS system updates...${NC}"
echo -e "${YELLOW}Checking for macOS system updates...${NC}"
softwareupdate --list
echo -e "${YELLOW}Updating Oh-My-ZSH...${NC}"

View File

@@ -1,4 +1,5 @@
if test ! "$(uname)" = "Darwin"; then
# ignore literally everything here if this isn't macOS
if [ ! "$(uname)" = "Darwin" ]; then
exit 0
fi