Skip to content

Commit

Permalink
feat(ubuntu-essentials): add 'less'
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Dec 28, 2024
1 parent 31a7ba9 commit 85803c2
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 18 deletions.
57 changes: 49 additions & 8 deletions .config/envman/alias.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
# For convenience / enjoyment
alias cat='bat --paging never --pager none --theme Dracula --style=plain'
alias diffy='diff -y --suppress-common-lines'

alias rgi='rg -i'

#alias rmrf='rm -rf'

alias rrsync='rsync -avhP'

alias git-junk-push='touch junk; git add junk; git commit -m "junk"; git push; git reset --hard HEAD~1; git push --force'

#alias -- -d='echo Đ ℈ ᕭ'
alias d-='echo Đ ℈ ᕭ'
alias D-='echo Đ ℈ ᕭ'

alias gitlog="git log --graph --all --pretty='format:%C(auto)%h %C(cyan)%ar %C(auto)%d %C(magenta)%an %C(auto)%s'"
alias gittop="git for-each-ref --sort='-committerdate' --format='%(committerdate)%09%(refname)' refs/heads | head -n 10"
alias ga='git add'
alias gc='git checkout'
alias gcm='git checkout main'
alias gcs='git checkout staging'
alias gd='git diff -w'
alias gl='git log'
alias gm='git commit -m'
alias gma='git commit --amend'
alias gr='git rebase'
alias gri='git rebase -i'
alias grim='git rebase -i main'
alias grm='git rebase main'
alias gs='git status'
alias gdc='git diff --cached -w'
alias grc='git rebase --continue'
alias grr='git rebase --root'
alias grir='git rebase -i --root'
alias curl='curlie'
alias gp='git push'
alias gf='git fetch'
alias gba='git branch -a'
#alias npm='socket npm'
#alias npx='socket npx'
alias tree='lsd -F --tree --group-dirs=last'
alias ts='date +%F_%H.%M.%S'
alias la='lsd -AF'
alias lg="lsd --group-dirs=first"
alias ll='lsd -lAhF'
alias ls='lsd -F'
alias tree='lsd -F --tree --group-dirs=last'
alias diffy='diff -y --suppress-common-lines'
alias git-force-bump='touch DELETE_ME && git add DELETE_ME && git commit -m "DELETE_ME" && git push && git reset --hard HEAD~1 && git push -f'
alias ts='date "+%F_%H.%M.%S"'
alias cat='bat --paging never --pager none --theme Dracula --style=plain'
alias ssh-addpass='ssh-setpass'

# For reference
alias scp-a='scp -rp'
Expand All @@ -16,22 +54,25 @@ alias npm-safe='socket npm'

# For keeping up with the latest Ai
alias ollama-leaderboard='open "https://evalplus.github.io/leaderboard.html"'
alias ollama-run='ollama run deepseek-coder-v2'
alias ollama-rmrf='ollama ls | grep ":" | cut -d":" -f1 | xargs ollama rm'
alias ollama-run='ollama run deepseek-coder-v2'
alias ollama-search='open "https://ollama.com/search"'

# For random keys, passwords, etc
alias rnd='xxd -l24 -p /dev/urandom | xxd -r -p | base64 | tr -d = | tr + - | tr / _'
alias rnd='xxd -l24 -ps /dev/urandom | xxd -r -ps | base64 | tr -d = | tr + - | tr / _'
alias rnd16='xxd -c 0 -l 40 -p /dev/urandom'
alias rnd32='xxd -c 0 -l 256 -p /dev/urandom | xxd -r -ps | base64 | tr -d [:space:]/+_-= | tr -d abcdefghijklmnopqrstuvwxyzILOU | cut -c 1-80'
alias rnd32='xxd -c 0 -l 256 -p /dev/urandom | xxd -r -ps | base64 | tr -d [:space:]/+_=- | tr -d abcdefghijklmnopqrstuvwxyzILOU | cut -c 1-80'
alias rnd58='xxd -c 0 -l 256 -p /dev/urandom | xxd -r -ps | base64 | tr -d [:space:]/+_=- | tr -d 0IOl | cut -c 1-80'
alias rnd62='xxd -c 0 -l 256 -p /dev/urandom | xxd -r -ps | base64 | tr -d [:space:]=+/_- | cut -c 1-80'
alias rnd62='xxd -c 0 -l 256 -p /dev/urandom | xxd -r -ps | base64 | tr -d [:space:]/+_=- | cut -c 1-80'
alias rnd64='xxd -c 0 -l 256 -p /dev/urandom | xxd -r -ps | base64 | tr -d [:space:]= | tr + - | tr / _ | cut -c 1-80'
alias rnd64std='xxd -c 0 -l 32 -p /dev/urandom | xxd -r -ps | base64'

# For listing toolchain targets
alias go-targets='go tool dist list'
alias rust-targets='rustc --print target-list | sort -r'
alias rust-targets='rustup target list'
alias zig-targets='zig targets | jq -r ".libc[]" | sort -r'

# To show copy-pasta for various setups
Expand Down
56 changes: 52 additions & 4 deletions .config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,12 +1,60 @@
# Đ Latin D with strike
# ℈ scruple
# ᕭ ttho
function fish_prompt --description 'Write out the prompt'
set -l last_pipestatus $pipestatus
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
set -l normal (set_color normal)
set -q fish_color_status
or set -g fish_color_status --background=red white

# Color the prompt differently when we're root
set -l color_cwd $fish_color_cwd
set -l suffix '>'
#set -l suffix '℈'
if functions -q fish_is_root_user; and fish_is_root_user
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
end
set suffix '#'
end

# Write pipestatus
# If the status was carried over (e.g. after `set`), don't bold it.
set -l bold_flag --bold
set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation
if test $__fish_prompt_status_generation = $status_generation
set bold_flag
end
set __fish_prompt_status_generation $status_generation
set -l status_color (set_color $fish_color_status)
set -l statusb_color (set_color $bold_flag $fish_color_status)
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)

echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " "
end

# Generated for envman. Do not edit.
test -s "$HOME/.config/envman/load.fish" ; and source "$HOME/.config/envman/load.fish"
test -s "$HOME/.config/envman/functions.fish" ; and source "$HOME/.config/envman/functions.fish"
test -s "$HOME/.config/envman/load.fish"; and source "$HOME/.config/envman/load.fish"

test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish

#zoxide init fish | source

# added by Webi for pyenv
status is-login ; and pyenv init --path | source
status is-interactive ; and pyenv init - | source
status is-login; and pyenv init --path | source
status is-interactive; and pyenv init - | source

# bun
set --export BUN_INSTALL "$HOME/.bun"
set --export PATH $BUN_INSTALL/bin $PATH

# added by Webi for fish
webi init fish | source

# Generated by Webi. Do not edit.
webi --init fish | source

source ~/.local/opt/brew/opt/chruby-fish/share/fish/vendor_functions.d/chruby.fish
source ~/.local/opt/brew/opt/chruby-fish/share/fish/vendor_functions.d/chruby_use.fish
source ~/.local/opt/brew/opt/chruby-fish/share/fish/vendor_functions.d/chruby_reset.fish
11 changes: 11 additions & 0 deletions .profile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
test -s "$HOME/.config/envman/load.sh" && . "$HOME/.config/envman/load.sh"
test -s "$HOME/.config/envman/functions.sh" && . "$HOME/.config/envman/functions.sh"

. "$HOME/.cargo/env"

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

if test -e ~/.local/opt/brew/opt/chruby/share/chruby/chruby.sh; then
# shellcheck disable=SC1090
. ~/.local/opt/brew/opt/chruby/share/chruby/chruby.sh
fi

# for when logging in to default shell (zsh) via ssh
screen -xRS awesome -s fish
2 changes: 1 addition & 1 deletion bin/alpine-install-essential-devtools
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -u
sudo apk update --no-cache
sudo apk add --no-cache curl sudo openssh xz unzip

sudo apk add --no-cache fish git htop screen vim wget zip
sudo apk add --no-cache fish git htop less screen vim wget zip

curl https://webi.sh/ssh-pubkey | sh
. ~/.config/envman/PATH.env
Expand Down
10 changes: 6 additions & 4 deletions bin/npm-install-essential-devtools
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ set -u
(
cd /tmp/

npm install --location=global \
@socketsecurity/cli@latest
# npm install --location=global \
# @socketsecurity/cli@latest

socket npm install --location=global \
# socket npm install --location=global \
# [email protected] \
npm install --location=global \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
typedoc \
[email protected]
)
2 changes: 1 addition & 1 deletion bin/ubuntu-install-essential-devtools
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo LANG=en_US.UTF-8 | tee /etc/default/locale
wget -O - https://webi.sh/ssh-adduser | sh

sudo apt-get update
sudo apt-get install -y curl fish git htop screen vim wget xz-utils unzip
sudo apt-get install -y curl fish git htop less screen vim wget xz-utils unzip

curl https://webi.sh/ssh-pubkey | sh
. ~/.config/envman/PATH.env
Expand Down

0 comments on commit 85803c2

Please sign in to comment.