1
0
Fork 0

Remove old installers, rewrite Dockerfile

main
Ambrose Chua 2020-11-04 01:18:01 +08:00
parent b44b795809
commit bc3fe27a01
57 changed files with 1367 additions and 4795 deletions

189
.brewfile
View File

@ -1,189 +0,0 @@
cask_args appdir: "/Applications"
tap "homebrew/cask"
tap "homebrew/services"
# system
brew "wget"
brew "xz"
#brew "upx"
brew "gnupg"
brew "git"
brew "zsh"
#brew "bash" # improve bash version
brew "neovim"
brew "pinentry"
# languages
#brew "python3"
#brew "go"
brew "node"
#brew "deno"
# system
#brew "grpc"
#brew "protobuf"
# flutter
#brew "usbmuxd", args: ["HEAD"]
#brew "libimobiledevice", args: ["HEAD"]
#brew "ideviceinstaller"
#brew "ios-deploy"
#brew "cocoapods"
# more system
#cask "docker"
# desktop
tap "koekeishiya/formulae"
brew "koekeishiya/formulae/skhd", args: ['HEAD']
brew "koekeishiya/formulae/yabai", args: ['HEAD']
#cask "bitbar"
#cask "iterm2-nightly"
cask "kitty"
cask "homebrew/cask-versions/firefox-nightly"
# user tools
brew "thefuck"
brew "pass"
brew "yadm"
brew "jq"
brew "httpie"
#brew "kubernetes-cli"
#tap "minio/stable"
# required for mc:
#brew "glib"
#brew "s-lang"
#brew "minio/stable/mc"
# extra system
#brew "coreutils"
#brew "gawk"
#brew "gnu-getopt"
#brew "gnu-sed"
#brew "gnu-tar"
#brew "figlet"
#brew "toilet"
#brew "lolcat"
brew "neofetch"
#brew "openssl"
#brew "p7zip"
#brew "unrar"
#brew "fswatch"
#brew "watch"
#brew "socat"
brew "htop"
brew "tmux"
brew "mosh"
brew "qemu"
#cask "intel-haxm"
#cask "virtualbox"
#cask "xquartz"
#cask "daisydisk"
#brew "ncdu"
tap "jeffreywildman/virt-manager"
brew "jeffreywildman/virt-manager/virt-viewer"
brew "jeffreywildman/virt-manager/virt-manager"
#cask "osxfuse"
#cask "gpgtools"
#cask "karabiner-elements"
#cask "switchresx"
cask "keycastr"
#cask "whoozle-android-file-transfer"
#cask "intel-power-gadget"
cask "avibrazil-rdm"
#cask "wacom-tablet"
# extra tools
#brew "highlight"
#brew "pwgen"
#brew "ghi"
#brew "hadolint"
#brew "kubernetes-helm"
#brew "terraform"
brew "ykman"
cask "keybase"
#cask "yubikey-neo-manager"
#cask "yubikey-personalization-gui"
#cask "yubikey-piv-manager"
#cask "dash"
#cask "graphql-playground"
# extra network
#brew "aria2"
#brew "shadowsocks-libev", restart_service: true
#brew "ipfs"
#brew "wrk"
#cask "tuntap"
# speedtest.net app
# microsoft remote desktop
# extra database
#brew "cockroach"
#brew "redis"
# extra analysis
#brew "masscan"
#brew "nmap"
#brew "binwalk"
#brew "foremost"
#brew "pngcheck"
#cask "burp-suite"
#cask "cutter"
#cask "binary-ninja"
#cask "wireshark"
brew "radare2"
# extra media
#brew "ffmpeg"
#brew "lame"
#brew "sox"
#brew "gifsicle"
brew "graphicsmagick"
brew "asciinema"
#cask "gimp"
cask "krita"
#cask "adobe-dng-converter"
#cask "inkscape"
# audacity
cask "obs"
cask "vlc"
# blackmagic davinci resolve
#cask "blender"
# blackmagic disk speed test
# epson scan
#cask "skyfonts"
# extra electronics
#brew "avrdude"
#brew "stlink"
#cask "arduino"
#brew "arduino-cli
cask "betaflight-configurator"
cask "coolterm"
#cask "etcher"
#cask "kicad"
# extra lang
#brew "sbt"
cask "android-sdk"
#cask "java"
#cask "qt-creator"
# extra apps
#tap "browsh-org/homebrew-browsh"
#brew "browsh-org/homebrew-browsh/browsh"
#cask "google-chrome"
#cask "brave-browser"
#cask "libreoffice"
cask "figma"
cask "spotify"
# extra apps social
#cask "slack"
cask "telegram"
cask "signal"
#cask "whatsapp"
cask "discord"
cask "skype"
#cask "flume"
#cask "ghost"
# extra apps gaming
#cask "steam"

View File

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Ubuntu</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>UbuntuMono</string>
</edit>
</match>
</fontconfig>

View File

@ -1,9 +1,9 @@
[push]
default = simple
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = Ambrose Chua
email = ambrose@chua.family
useConfigOnly = true
signingkey = 4995FE8D
[core]
editor = nvim
email = ambrose@hey.com
[init]
defaultBranch = main
[pull]
rebase = true

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +1,54 @@
" setup plugins
call plug#begin()
" TODO: switch to language server
" rust
Plug 'rust-lang/rust.vim'
let g:rustfmt_autosave = 1
" go
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
let g:go_term_enabled = 1
let g:go_highlight_array_whitespace_error = 1
let g:go_highlight_chan_whitespace_error = 1
let g:go_highlight_space_tab_error = 0
let g:go_highlight_extra_types = 1
let g:go_highlight_trailing_whitespace_error = 0
let g:go_highlight_operators = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_parameters = 0
let g:go_highlight_function_calls = 0
let g:go_highlight_types = 1
let g:go_highlight_fields = 0
let g:go_highlight_build_constraints = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_string_spellcheck = 1
let g:go_highlight_format_strings = 1
let g:go_highlight_variable_declarations = 0
let g:go_highlight_variable_assignments = 0
let g:go_auto_type_info = 1
let g:go_auto_sameids = 1
let g:go_doc_keywordprg_enabled = 1
autocmd FileType go call s:define_go_leader_mappings()
function! s:define_go_leader_mappings()
" [r] Run go application
nnoremap <silent> <Leader>r :<C-u>GoRun<CR>
" [b] Build go application
nnoremap <silent> <Leader>b :<C-u>GoBuild<CR>
endfunction
" python
Plug 'python-mode/python-mode', { 'for': [ 'python' ], 'branch': 'develop' }
let g:pymode_rope = 1
"let g:pymode_rope_completion = 1
"let g:pymode_rope_completion_bind = '<C-e>'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
autocmd FileType go nmap <leader>t <Plug>(go-test)
autocmd FileType go nmap <Leader>c <Plug>(go-coverage-toggle)
autocmd FileType go nmap <leader>b <Plug>(go-build)
autocmd FileType go nmap <leader>r <Plug>(go-run)
call plug#end()
" theme
set background=dark
if $LIGHT == 'true'
set background=light
endif
silent! colorscheme solarized
" statusline
function! GitBranch()
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
endfunction
function! GitDirty()
return system("git status --porcelain --ignore-submodules -unormal 2>/dev/null") != ""
return system("git status --porcelain --ignore-submodules -unormal 2>/dev/null") != ""
endfunction
let w:git_branch = GitBranch()
let w:git_dirty = GitDirty()
function! StatuslineUpdateLazy()
let w:git_branch = GitBranch()
let w:git_dirty = GitDirty()
let w:git_branch = GitBranch()
let w:git_dirty = GitDirty()
endfunction
function! StatuslineGit()
return strlen(w:git_branch) > 0?' '.w:git_branch.' ':''
return strlen(w:git_branch) > 0?' '.w:git_branch.' ':''
endfunction
highlight StatusLine ctermfg=14 ctermbg=0 cterm=none
highlight StatusLineNC ctermfg=11 ctermbg=0 cterm=none
" sections
highlight StatuslineModeNormal ctermfg=15 ctermbg=9 cterm=italic
highlight StatuslineModeInsert ctermfg=15 ctermbg=2 cterm=italic
highlight StatuslineModeReplace ctermfg=15 ctermbg=13 cterm=italic
highlight StatuslineModeVisual ctermfg=15 ctermbg=1 cterm=italic
highlight StatuslineModeVisualLine ctermfg=15 ctermbg=1 cterm=bold,italic
highlight StatuslineModeCommand ctermfg=15 ctermbg=4 cterm=italic
highlight StatuslineModeOther ctermfg=15 ctermbg=8 cterm=italic
highlight StatuslineGit ctermfg=14 ctermbg=8 cterm=none
highlight StatuslineGitDirty ctermfg=14 ctermbg=8 cterm=bold
highlight StatuslineFileInfo ctermfg=11 ctermbg=0 cterm=italic
highlight StatuslineFileStats ctermfg=14 ctermbg=8 cterm=none
highlight StatuslineCursor ctermfg=15 ctermbg=6 cterm=none
" assembly
set statusline=
set statusline+=%#StatuslineModeNormal#%{(mode()=='n')?'\ \ NORMAL\ \ ':''}
set statusline+=%#StatuslineModeInsert#%{(mode()=='i')?'\ \ INSERT\ \ ':''}
set statusline+=%#StatuslineModeReplace#%{(mode()=='r')?'\ \ REPLACE\ ':''}
set statusline+=%#StatuslineModeReplace#%{(mode()=='R')?'\ \ REPLACE\ ':''}
set statusline+=%#StatuslineModeVisual#%{(mode()=='v')?'\ \ VISUAL\ \ ':''}
set statusline+=%#StatuslineModeVisualLine#%{(mode()=='V')?'\ \ VISUAL\ \ ':''}
set statusline+=%#StatuslineModeVisual#%{(mode()==\"\\\<C-V>\")?'\ \ V-BLOCK\ ':''}
@ -114,100 +76,64 @@ set statusline+=%#StatuslineCursor#
set statusline+=\ %l:%c
set statusline+=\
augroup StatuslineUpdate
autocmd BufWritePost,BufEnter,ShellCmdPost * call StatuslineUpdateLazy()
autocmd BufWritePost,BufEnter,ShellCmdPost * call StatuslineUpdateLazy()
augroup END
" tabline
highlight TabLineFill ctermfg=11 ctermbg=0 cterm=none
highlight TabLine ctermfg=14 ctermbg=0 cterm=none
highlight TabLineSel ctermfg=15 ctermbg=9 cterm=italic
" folding, numbering, cursorline
" split
highlight VertSplit ctermfg=0 ctermbg=0 cterm=none
" highlighting
highlight SpellBad cterm=undercurl ctermbg=0
highlight SpellCap cterm=undercurl ctermbg=0
highlight SpellLocal cterm=undercurl ctermbg=0
highlight SpellRare cterm=undercurl ctermbg=0
" folding
highlight Folded ctermfg=10 ctermbg=none cterm=bold
highlight FoldColumn ctermfg=11 ctermbg=none cterm=none
set foldcolumn=1
" not enabled because folding is usually undesirable
" add modeline foldmethod=syntax to enable
"set foldmethod=syntax
" numbering
set number
highlight LineNr ctermfg=10 ctermbg=none cterm=none
" cursor and line
set cursorline
highlight CursorLine ctermfg=none ctermbg=none cterm=none
highlight CursorLineNR ctermfg=12 ctermbg=none cterm=bold
" selection
highlight Visual ctermfg=none ctermbg=0 cterm=none
" indentation
set tabstop=4
set softtabstop=4
set shiftwidth=4
" indentation overrides
"filetype indent on
" TODO: figure out how to properly use the runtime overrides
" width
highlight ColorColumn ctermfg=none ctermbg=0 cterm=none
"set textwidth=80
set colorcolumn=80
"set textwidth=80
" enable configuring indentation and width using modeline
set modeline
" skel
augroup Skel
autocmd BufNewFile *.sh 0r ~/.config/nvim/skel/skel.sh
autocmd BufNewFile *.md 0r ~/.config/nvim/skel/skel.md
autocmd BufNewFile *.html 0r ~/.config/nvim/skel/skel.html
autocmd BufNewFile *.py 0r ~/.config/nvim/skel/skel.py
autocmd BufNewFile *.sh 0r ~/.config/nvim/skel/skel.sh
autocmd BufNewFile *.md 0r ~/.config/nvim/skel/skel.md
autocmd BufNewFile *.html 0r ~/.config/nvim/skel/skel.html
autocmd BufNewFile *.py 0r ~/.config/nvim/skel/skel.py
augroup END
" general
set fillchars=stl:\ ,stlnc:\ ,vert:\ ,fold,diff:-
" characters, hidden characters
" hidden characters
set fillchars=stl:\ ,stlnc:\ ,vert:\ ,fold,diff:-
set list
let g:listchars = [ "tab:\\\ \\\ ,extends:,precedes:,nbsp:␣,trail:·", "tab:⇥\\\ ,extends:,precedes:,nbsp:␣,trail:·,space:·", "tab:⇥\\\ ,extends:,precedes:,nbsp:␣,trail:·,space:·,eol:↵"]
let g:listchars_mode = 0 " 0 means default is 1
highlight Whitespace ctermfg=11 ctermbg=none cterm=none
let g:listchars_mode = -1 " -1 means default is 0
function! ToggleListChars()
let g:listchars_mode += 1
if g:listchars_mode >= len(g:listchars)
"set nolist
let g:listchars_mode = -1
call ToggleListChars()
else
set list
if g:listchars_mode == 1
highlight Whitespace ctermfg=237 ctermbg=none cterm=none
else
highlight Whitespace ctermfg=11 ctermbg=none cterm=none
endif
execute "set listchars=".g:listchars[g:listchars_mode]
endif
let g:listchars_mode += 1
if g:listchars_mode >= len(g:listchars)
let g:listchars_mode = -1
call ToggleListChars()
else
exe "set listchars=".g:listchars[g:listchars_mode]
endif
endfunction
call ToggleListChars()
command! NonPrintable call ToggleListChars()
command! NP call ToggleListChars()
" file browser
let g:netrw_banner=0
let g:netrw_liststyle=3
let g:netrw_winsize=25
" spellcheck
set spell spelllang=en_gb
" modeline
set modeline
" vim: set expandtab ts=2 sw=2:

View File

@ -1,66 +1,81 @@
FROM alpine:latest
FROM alpine:3.12
# install essential
RUN apk add --no-cache --update openssl wget curl \
&& echo hosts: dns files > /etc/nsswitch.conf
# install nix (https://github.com/NixOS/docker)
ARG NIX_VERSION=2.3.6
RUN wget https://nixos.org/releases/nix/nix-${NIX_VERSION}/nix-${NIX_VERSION}-x86_64-linux.tar.xz \
&& tar xf nix-${NIX_VERSION}-x86_64-linux.tar.xz \
&& addgroup -g 30000 -S nixbld \
&& for i in $(seq 1 30); do adduser -S -D -h /var/empty -g "Nix build user $i" -u $((30000 + i)) -G nixbld nixbld$i ; done \
&& mkdir -m 0755 /etc/nix \
&& echo 'sandbox = false' > /etc/nix/nix.conf \
&& mkdir -m 0755 /nix && USER=root sh nix-${NIX_VERSION}-x86_64-linux/install \
&& ln -s /nix/var/nix/profiles/default/etc/profile.d/nix.sh /etc/profile.d/ \
&& rm -r /nix-${NIX_VERSION}-x86_64-linux* \
&& rm -rf /var/cache/apk/* \
&& /nix/var/nix/profiles/default/bin/nix-collect-garbage --delete-old \
&& /nix/var/nix/profiles/default/bin/nix-store --optimise \
&& /nix/var/nix/profiles/default/bin/nix-store --verify --check-contents
ENV \
ENV=/etc/profile \
USER=root \
PATH=/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin \
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt \
NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
NIX_PATH=/nix/var/nix/profiles/per-user/root/channels
# install common
RUN apk add --no-cache --update \
sudo \
unzip zip tar gzip xz upx \
\
zsh \
exa jq \
neovim \
\
openssh-client \
git \
pass gnupg \
\
python3 \
alpine-sdk
# create user
RUN adduser -s /bin/zsh -D ambrose
RUN echo '' >> /etc/sudoers
RUN echo '## No password sudo' >> /etc/sudoers
RUN echo 'ambrose ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# install dotfiles
WORKDIR /home/ambrose
COPY --chown=ambrose:ambrose . .
# install tools
# repositories
RUN ./.install/repositories.sh
# system
RUN ./.install/core.sh
RUN ./.install/sdk.sh
RUN ./.install/sudo.sh
RUN ./.install/archival.sh
RUN ./.install/upx.sh
RUN ./.install/dust.sh
RUN ./.install/gnupg.sh
RUN ./.install/git.sh
RUN ./.install/zsh.sh
RUN ./.install/neovim-source.sh
# languages
RUN ./.install/python.sh
RUN ./.install/golang-source.sh
RUN ./.install/node-source.sh
#RUN ./.install/jdk.sh
# more system
RUN ./.install/docker.sh
RUN ./.install/hadolint.sh
# desktop
#RUN ./.install/desktop.sh
#RUN ./.install/firefox.sh
# switch to user
USER ambrose
# install user programs
# shell config
RUN ./.install/dircolors.sh
RUN ./.install/pure.sh
RUN ./.install/thefuck.sh
RUN ./.install/zsh-autosuggestions.sh
RUN ./.install/zsh-syntax-highlighting.sh
# editor
RUN ./.install/plug.sh
# tools
RUN ./.install/yadm.sh
RUN ./.install/pass.sh
RUN ./.install/packr.sh
RUN ./.install/caddy.sh
RUN ./.install/httpie.sh
RUN ./.install/jq.sh
RUN ./.install/kubectl.sh
RUN ./.install/minio-client.sh
RUN ./.install/yarn.sh
#RUN ./.install/gradlr.sh
RUN pip3 install --no-cache-dir --user thefuck
RUN pip3 install --no-cache-dir --user httpie
# TODO: https://github.com/bootandy/dust/
# TODO: https://github.com/TheLocehiliosan/yadm/
# install additional tooling
RUN echo '@edge-testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk add --no-cache --update \
kubectl@edge-testing \
minio-client@edge-testing
# open login shell by default

View File

@ -3,6 +3,6 @@
Dockerfile
.dockerignore
.drone.yml
.runenv
README.md
LICENSE

View File

@ -1,220 +0,0 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: registry.makerforce.io
repo: registry.makerforce.io/ambrose/env
dockerfile: .dockerfile
tags:
- latest
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: slack
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
when:
status: [ failure, success ]
---
kind: pipeline
name: test-neovim
steps:
- name: test-plug
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/neovim.sh
- ./.install/core.sh
- ./.install/plug.sh
---
kind: pipeline
name: test-python
steps:
- name: test-python
image: alpine:latest
commands:
- ./.install/python.sh
- python3 --version
- pip3 --version
---
kind: pipeline
name: test-golang
steps:
- name: test-golang
image: alpine:latest
commands:
- ./.install/golang-source.sh
- go version
- name: test-packr
image: golang:1.13-alpine
commands:
- ./.install/git.sh
- ./.install/upx.sh
- ./.install/packr.sh
- name: test-caddy
image: golang:1.13-alpine
commands:
- apk add --no-cache build-base
- ./.install/git.sh
- ./.install/upx.sh
- ./.install/caddy.sh
---
kind: pipeline
name: test-node
steps:
- name: test-yarn
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/node.sh
- ./.install/core.sh
- ./.install/gnupg.sh
- ./.install/yarn.sh
- ~/.local/bin/yarn --version
---
kind: pipeline
name: test-jdk
steps:
- name: test-jdk
image: alpine:latest
commands:
- ./.install/jdk.sh
- java -version
---
kind: pipeline
name: test-dircolors
steps:
- name: test-dircolors
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/dircolors.sh
---
kind: pipeline
name: test-dust
steps:
- name: test-dust
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/upx.sh
- ./.install/dust.sh
---
kind: pipeline
name: test-hadolint
steps:
- name: test-hadolint
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/hadolint.sh
---
kind: pipeline
name: test-pure
steps:
- name: test-pure
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/pure.sh
---
kind: pipeline
name: test-thefuck
steps:
- name: test-thefuck
image: alpine:latest
commands:
- ./.install/python.sh
- ./.install/sudo.sh
- ./.install/thefuck.sh
- ~/.local/bin/thefuck -v
---
kind: pipeline
name: test-zsh-autosuggestions
steps:
- name: test-zsh-autosuggestions
image: alpine:latest
commands:
- ./.install/git.sh
- ./.install/zsh-autosuggestions.sh
---
kind: pipeline
name: test-zsh-syntax-highlighting
steps:
- name: test-zsh-syntax-highlighting
image: alpine:latest
commands:
- ./.install/git.sh
- ./.install/zsh-syntax-highlighting.sh
---
kind: pipeline
name: test-yadm
steps:
- name: test-yadm
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/git.sh
- ./.install/yadm.sh
- ~/.local/bin/yadm version
---
kind: pipeline
name: test-pass
steps:
- name: test-pass
image: alpine:latest
commands:
- ./.install/repositories.sh
- ./.install/sudo.sh
- ./.install/pass.sh
- pass version
---
kind: pipeline
name: test-httpie
steps:
- name: test-httpie
image: alpine:latest
commands:
- ./.install/python.sh
- ./.install/httpie.sh
- ~/.local/bin/http --version
---
kind: pipeline
name: test-jq
steps:
- name: test-jq
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/upx.sh
- ./.install/jq.sh
- ~/.local/bin/jq --version
---
kind: pipeline
name: test-kubectl
steps:
- name: test-kubectl
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/upx.sh
- ./.install/kubectl.sh
- ~/.local/bin/kubectl version --client
---
kind: pipeline
name: test-minio-client
steps:
- name: test-minio-client
image: alpine:latest
commands:
- ./.install/core.sh
- ./.install/upx.sh
- ./.install/minio-client.sh
- ~/.local/bin/mc version

View File

@ -1,66 +0,0 @@
#!/bin/sh
# Custom Kernel
sudo dnf install fedpkg ccache
fedpkg clone -a kernel
cd kernel
git checkout f31
sudo dnf builddep kernel.spec
# edit kernel.spec to change buildid to macbookpro
echo CONFIG_KEYBOARD_APPLESPI=y >> kernel-local
./configs/build_configs.sh
make release
fedpkg local
sudo dnf install --nogpgcheck ./x86_64/kernel-core-5.3.8-304.macbookpro.fc31.x86_64
#sudo dnf install --nogpgcheck ./x86_64/kernel-devel-5.3.8-304.macbookpro.fc31.x86_64
sudo dnf install --nogpgcheck ./x86_64/kernel-modules-5.3.8-304.macbookpro.fc31.x86_64
sudo dnf install --nogpgcheck ./x86_64/kernel-modules-extra-5.3.8-304.macbookpro.fc31.x86_64
sudo dnf install --nogpgcheck ./x86_64/kernel-5.3.8-304.macbookpro.fc31.x86_64
# ZFS
sudo dnf install http://download.zfsonlinux.org/fedora/zfs-release$(rpm -E %dist).noarch.rpm
sudo dnf install kernel-devel zfs
# GNOME
dconf write /org/gnome/desktop/input-sources/xkb-options '["caps:escape"]'
# Sway
sudo dnf install sway
sudo dnf remove rxvt-unicode
sudo dnf copr enable gagbo/kitty-latest
sudo dnf install kitty
# ZSH
sudo dnf install zsh
# Yadm
sudo dnf copr enable thelocehiliosan/yadm
sudo dnf install yadm
# Password Store
sudo dnf install pass
# thefuck
sudo dnf install thefuck
# Neovim
sudo dnf install neovim
sudo dnf install cmake
# Firefox
# Comes with Fedora Workstation, sudo dnf install firefox
# GNOME Web
flatpak install fedora org.gnome.Epiphany
# Geary
flatpak install fedora org.gnome.Geary
# Spotify
flatpak install flathub com.spotify.Client
# Telegram
flatpak install flathub org.telegram.desktop
# Discord
flatpak install flathub com.discordapp.Discord
# Inkscape
#flatpak install flathub org.inkscape.Inkscape
# Krita
#flatpak install flathub org.kde.krita
# darktable
#flatpak install flathub org.darktable.Darktable

View File

@ -1,16 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing archival tools..."
echo
apk add --no-cache \
unzip \
zip \
tar \
gzip \
xz

View File

@ -1,22 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing Caddy $CADDY_VERSION..."
echo
if [ "$CADDY_VERSION" = "master" ]; then
branch=$CADDY_VERSION
else
branch=v$CADDY_VERSION
fi
git clone --depth 1 -b $branch https://github.com/caddyserver/caddy $(go env GOPATH)/src/github.com/caddyserver/caddy
export GO111MODULE=on
cd $(go env GOPATH)/src/github.com/caddyserver/caddy/caddy
go install
upx $(go env GOPATH)/bin/caddy
go clean -cache

View File

@ -1,18 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing system utilities..."
echo
apk add --no-cache \
nano \
curl \
wget \
bash \
openssh-client
# bash for compatibility

View File

@ -1,35 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing sway and dependencies..."
echo
apk add --no-cache \
dbus \
eudev \
libinput \
xf86-video-intel \
xorg-server-xwayland \
sway@testing \
sway-doc@testing \
dmenu \
rxvt-unicode \
ttf-ubuntu-font-family \
ttf-opensans@community
rc-update add udev
rc-update add dbus
apk add --no-cache \
alsa-utils \
alsa-utils-doc \
alsa-lib \
alsaconf \
pulseaudio \
pulseaudio-doc@community \
pulseaudio-libs \
pulseaudio-alsa@community
rc-update add alsa

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
echo
echo "Downloading LS_COLORS..."
echo
curl -fLo ~/.dircolors \
https://github.com/trapd00r/LS_COLORS/raw/master/LS_COLORS

View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing docker..."
echo
apk add --no-cache \
docker@community
#upx /usr/bin/docker{,d,-proxy}

View File

@ -1,21 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing dust $DUST_VERSION..."
echo
if [[ "$(uname -s)" == "Darwin" ]]; then
os="apple-darwin"
else
os="unknown-linux-gnu"
fi
curl -fSLO https://github.com/bootandy/dust/releases/download/v$DUST_VERSION/dust-v$DUST_VERSION-x86_64-$os.tar.gz
mkdir -p ~/.local/bin
tar -xzf dust-v$DUST_VERSION-x86_64-$os.tar.gz -C ~/.local/bin
upx ~/.local/bin/dust
rm dust-v$DUST_VERSION-x86_64-$os.tar.gz

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing emojify..."
echo
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/emojify \
https://raw.githubusercontent.com/mrowa44/emojify/master/emojify
chmod a+x ~/.local/bin/emojify

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing firefox..."
echo
apk add --no-cache \
firefox@testing

View File

@ -1,16 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing git..."
echo
apk add --no-cache \
git \
git-doc \
less
# less to fix pager issues

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing GnuPG..."
echo
apk add --no-cache \
gnupg

View File

@ -1,46 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing Go $GOLANG_VERSION..."
echo
apk add --no-cache \
git
apk add --no-cache --virtual .build-deps \
bash \
gcc \
musl-dev \
openssl \
wget \
tar \
go
GOROOT_BOOTSTRAP="$(go env GOROOT)"
GOOS="$(go env GOOS)"
GOARCH="$(go env GOARCH)"
GOHOSTOS="$(go env GOHOSTOS)"
GOHOSTARCH="$(go env GOHOSTARCH)"
wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"
echo "$GOLANG_HASH *go.tgz" | sha256sum -c -
tar -C /usr/local -xzf go.tgz
rm go.tgz
cd /usr/local/go/src
./make.bash
# cleanup
rm -rf \
/usr/local/go/pkg/bootstrap \
/usr/local/go/pkg/obj
# symlink into /usr/local/bin
ln -s /usr/local/go/bin/* /usr/local/bin/
apk del --no-cache .build-deps

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing Go from repositories..."
echo
apk add --no-cache \
git \
go@community

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing gradlr..."
echo
yarn global add gradlr

View File

@ -1,20 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing hadolint $HADOLINT_VERSION..."
echo
if [[ "$(uname -s)" == "Darwin" ]]; then
os="Darwin"
else
os="Linux"
fi
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/hadolint \
https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$os-x86_64
chmod a+x ~/.local/bin/hadolint

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing HTTPie..."
echo
pip3 install --no-cache-dir --user httpie

View File

@ -1,16 +0,0 @@
#!/bin/sh
set -e
. ./.versions
echo
echo "Installing iTerm2 Profiles..."
echo
if ! [[ "$(uname -s)" == "Darwin" ]]; then
echo "Not supported on Linux"
exit 1
fi
ln -s $HOME/.config/iterm2profiles.json Library/Application\ Support/iTerm2/DynamicProfiles/env.json

View File

@ -1,24 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing OpenJDK $JDK_NUMBER $JDK_VERSION..."
echo
apk add --no-cache --virtual .build-deps \
curl \
tar
#curl -fLo jdk.tar.gz https://download.java.net/java/GA/jdk$JDK_NUMBER/$JDK_VERSION/binaries/openjdk-${JDK_VERSION}_linux-x64_bin.tar.gz
curl -fLo jdk.tar.gz https://download.java.net/java/early_access/alpine/$JDK_VERSION/binaries/openjdk-$JDK_NUMBER-ea+${JDK_VERSION}_linux-x64-musl_bin.tar.gz
tar -C /usr/local -xzf jdk.tar.gz
ln -s /usr/local/jdk-$JDK_NUMBER /usr/local/jdk
rm jdk.tar.gz
# symlink into /usr/local/bin
ln -s /usr/local/jdk/bin/* /usr/local/bin/
apk del --no-cache .build-deps

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing jq $JQ_VERSION..."
echo
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/jq \
https://github.com/stedolan/jq/releases/download/jq-$JQ_VERSION/jq-linux64
chmod a+x ~/.local/bin/jq
upx ~/.local/bin/jq

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing kubectl $KUBECTL_VERSION..."
echo
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/kubectl \
https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl
chmod a+x ~/.local/bin/kubectl
upx ~/.local/bin/kubectl

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing minio-client..."
echo
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/mc \
https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod a+x ~/.local/bin/mc
upx ~/.local/bin/mc

View File

@ -1,49 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing neovim $NEOVIM_VERSION..."
echo
apk add --no-cache \
gettext \
unibilium \
libtermkey \
libvterm \
libgcc \
python3 \
clang-libs # For deoplete-clang
apk add --no-cache --virtual .build-deps \
curl \
git \
unzip \
build-base \
autoconf \
automake \
cmake \
libtool \
gettext-dev \
unibilium-dev \
libtermkey-dev \
libvterm-dev \
python3-dev \
python3
if [ "$NEOVIM_VERSION" = "nightly" ]; then
branch=$NEOVIM_VERSION
else
branch=v$NEOVIM_VERSION
fi
git clone --depth 1 -b $branch https://github.com/neovim/neovim.git
cd neovim
make CMAKE_EXTRA_FLAGS=-DENABLE_JEMALLOC=OFF >/dev/null || make
make install
cd ..
rm -rf neovim
pip3 install --no-cache-dir neovim
apk del --no-cache .build-deps

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing neovim from repositories..."
echo
apk add --no-cache \
neovim@community

View File

@ -1,57 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing Node.js $NODE_VERSION..."
echo
apk add --no-cache \
libstdc++
apk add --no-cache --virtual .build-deps \
binutils-gold \
curl \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python \
xz
for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
56730D5401028683275BD23C23EFEFE93C4CFFFE \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
; do
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ||
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" ||
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key"
done
curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz"
curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc"
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c -
tar -xf "node-v$NODE_VERSION.tar.xz"
cd "node-v$NODE_VERSION"
./configure
make -j$(getconf _NPROCESSORS_ONLN) >/dev/null || make
make install
apk del --no-cache .build-deps
cd ..
rm -Rf "node-v$NODE_VERSION"
rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing nodejs from repositories..."
echo
apk add --no-cache \
nodejs@community

View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing packr..."
echo
go get github.com/gobuffalo/packr/v2/packr2
upx $(go env GOPATH)/bin/packr2
go clean -cache

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
echo
echo "Installing pass..."
echo
sudo apk add --no-cache \
gnupg \
pass@testing

View File

@ -1,21 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing vim-plug..."
echo
# avoid warnings and install spellcheck files first
curl -fLo ~/.local/share/nvim/site/spell/en.utf-8.spl --create-dirs \
http://ftp.vim.org/pub/vim/runtime/spell/en.utf-8.spl
curl -fLo ~/.local/share/nvim/site/spell/en.utf-8.sug --create-dirs \
http://ftp.vim.org/pub/vim/runtime/spell/en.utf-8.sug
# install plug
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://github.com/junegunn/vim-plug/raw/$VIM_PLUG_VERSION/plug.vim
nvim +PlugInstall +qa || true

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing pure-prompt for zsh..."
echo
mkdir -p ~/.config/zsh/functions
curl -fLo ~/.config/zsh/functions/prompt_pure_setup \
https://github.com/sindresorhus/pure/raw/v$PURE_VERSION/pure.zsh
curl -fLo ~/.config/zsh/functions/async \
https://github.com/sindresorhus/pure/raw/v$PURE_VERSION/async.zsh

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing Python 3 with apk..."
echo
apk add --no-cache \
python3

View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
echo
echo "Setting up repositories..."
echo
cat >> /etc/apk/repositories << EOF
@edge http://dl-cdn.alpinelinux.org/alpine/edge/main
@community http://dl-cdn.alpinelinux.org/alpine/edge/community
@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing
EOF

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing C/C++ compilers..."
echo
apk add --no-cache \
alpine-sdk

View File

@ -1,16 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing sudo..."
echo
apk add --no-cache \
sudo
echo '' >> /etc/sudoers
echo '## No password sudo' >> /etc/sudoers
echo 'ambrose ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

View File

@ -1,17 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing thefuck for zsh..."
echo
sudo apk add --no-cache --virtual .build-deps \
build-base \
python3-dev \
linux-headers
pip3 install --no-cache-dir --user thefuck
sudo apk del --no-cache .build-deps

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing UPX..."
echo
apk add --no-cache \
upx

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing yadm..."
echo
mkdir -p ~/.local/bin
curl -fLo ~/.local/bin/yadm \
https://github.com/TheLocehiliosan/yadm/raw/$YADM_VERSION/yadm
chmod a+x ~/.local/bin/yadm

View File

@ -1,28 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing Yarn $YARN_VERSION..."
echo
for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ||
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" ||
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key"
done
curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz"
curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc"
gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
mkdir -p ~/.local/lib/
mkdir -p ~/.local/bin/
tar -xzf yarn-v$YARN_VERSION.tar.gz -C ~/.local/lib
ln -s ../lib/yarn-v$YARN_VERSION/bin/yarn ~/.local/bin/yarn
ln -s ../lib/yarn-v$YARN_VERSION/bin/yarnpkg ~/.local/bin/yarnpkg
rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing zsh-autosuggestions..."
echo
git clone --depth 1 -b v$ZSH_AUTOSUGGESTIONS_VERSION https://github.com/zsh-users/zsh-autosuggestions ~/.config/zsh/zsh-autosuggestions

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing zsh-syntax-highlighting..."
echo
git clone --depth 1 -b $ZSH_SYNTAX_HIGHLIGHTING_VERSION https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.config/zsh/zsh-syntax-highlighting

View File

@ -1,13 +0,0 @@
#!/bin/sh
set -e
. "$(dirname "$0")"/../.versions
echo
echo "Installing zsh..."
echo
apk add --no-cache \
zsh \
coreutils

View File

@ -1,100 +0,0 @@
#!/bin/zsh
MODE_DEFAULT=('default.jpg' 'true' 'Solarized Matched' 'dark' 'df202020' 'ff999999')
MODE_DEFAULT_LIGHT=('default.jpg' 'false' 'Solarized Light Matched' 'light' 'dff9f9f9' 'ff666666')
MODE_DARK=('dark.png' 'true' 'Solarized Matched' 'dark' '00202020' 'ff999999')
MODE_LIGHT=('light.png' 'false' 'Solarized Light Matched' 'light' '00dfdfdf' 'ff666666')
evaluate() {
input="$1"
shift
replacements=($@)
for i in {1..$#replacements}; do
match="{$i}"
replacement="${replacements[i]}"
input="$(echo "$input" | sed "s/$match/$replacement/g")"
done
echo $input
}
change_system_theme() {
mode=($@)
rm -f ~/Pictures/wallpapers/current/*
cp ~/.wallpaper/"${mode[1]}" ~/Pictures/wallpapers/current/"${mode[3]}${mode[1]}"
template="
tell application \"System Events\"
tell desktops
set change interval to -1
set change interval to 1
end tell
tell appearance preferences
set dark mode to {2}
end tell
end tell
"
osascript -e "$(evaluate "$template" $mode)"
}
change_iterm2_theme() {
mode=($@)
template='
import iterm2
async def main(conn):
app = await iterm2.async_get_app(conn)
profiles = await iterm2.PartialProfile.async_query(conn)
new_profile = None
for profile in profiles:
if profile.name == "{3}":
new_profile = await profile.async_get_full_profile()
await profile.async_make_default()
windows = app.terminal_windows
for window in windows:
tabs = window.tabs
for tab in tabs:
sessions = tab.sessions
for session in sessions:
await session.async_set_profile(new_profile)
iterm2.run_until_complete(main)
'
script="$HOME/Library/Application Support/iTerm2/Scripts/change-theme.py"
evaluate "$template" $mode > $script
python3 $script
}
change_kitty_theme() {
mode=($@)
rm ~/.config/kitty/colorscheme.conf
ln -s colorscheme.${mode[4]}.conf ~/.config/kitty/colorscheme.conf
kitty @ set-colors -a ~/.config/kitty/colorscheme.conf
}
change_yabai_theme() {
mode=($@)
cat ~/.config/yabai/yabairc.template | sed "s/<background>/${mode[5]}/g" | sed "s/<foreground>/${mode[6]}/g" > ~/.config/yabai/yabairc
yabai -m config status_bar_background_color 0x${mode[5]}
yabai -m config status_bar_foreground_color 0x${mode[6]}
}
mode_name="MODE_$1:u"
mode=(${(P)mode_name})
if [[ -z $mode ]]; then
echo "No mode specified"
exit 1
fi
if [[ "$(uname -s)" == "Darwin" ]]; then
change_system_theme $mode
change_yabai_theme $mode
fi
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
change_iterm2_theme $mode
fi
if [[ "$TERM" == "xterm-kitty" ]]; then
change_kitty_theme $mode
fi

View File

@ -1,31 +0,0 @@
#!/bin/sh
set -e
PEV="$HOME/pev"
if [[ ! -d "$PEV/bin" ]]; then
if [[ ! -d "$PEV/src" ]]; then
git clone --recursive https://github.com/merces/pev.git "$PEV/src"
fi
if ! ldconfig -p | grep libssl > /dev/null; then
echo "Please install openssl-devel"
exit 1
fi
cd "$PEV/src"
make prefix="$PEV"
make prefix="$PEV" install
fi
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PEV/lib"
PROG="$1"
if [[ -z "$PROG" ]]; then
echo "Usage: $0 PROG [ARGS...]"
echo -n "Programs: "
find "$PEV/bin" -maxdepth 1 -perm -111 -type f -printf "%f "
exit 1
fi
shift
"$PEV/bin/$PROG" "$@"

View File

@ -1,3 +0,0 @@
#!/bin/sh
docker run -it --rm -v $(pwd):/data dominicbreuker/stego-toolkit

File diff suppressed because it is too large Load Diff

View File

@ -15,11 +15,10 @@ Host saguaro
Host pricklypear
Hostname pricklypear.cacti.makerforce.io
User root
Port 22
User ambrose
Port 26779
Host raspi
Hostname raspi.cacti.makerforce.io
User pi
Port 22

View File

@ -1,32 +0,0 @@
#!/bin/sh
export NEOVIM_VERSION=0.4.3
export GOLANG_VERSION=1.14.2
export GOLANG_HASH=98de84e69726a66da7b4e58eac41b99cbe274d7e8906eeb8a5b7eb0aadee7f7c
export NODE_VERSION=12.16.1
export YARN_VERSION=1.22.4
export JDK_NUMBER=14
export JDK_VERSION=15
export VIM_PLUG_VERSION=0.10.0
export PURE_VERSION=1.11.0
export YADM_VERSION=2.4.0
export ZSH_AUTOSUGGESTIONS_VERSION=0.6.4
export ZSH_SYNTAX_HIGHLIGHTING_VERSION=0.7.1
export CADDY_VERSION=1.0.3
export JQ_VERSION=1.6
export KUBECTL_VERSION=1.18.0
export DUST_VERSION=0.3.1
export HADOLINT_VERSION=1.17.2

125
.zshrc
View File

@ -1,3 +1,6 @@
# basic settings
export HISTSIZE=10000
export SAVEHIST=100000
setopt append_history
@ -10,12 +13,69 @@ setopt completeinword
setopt interactivecomments
setopt extended_glob
# keybindings
bindkey -v
bindkey "^R" history-incremental-pattern-search-backward
# editors
alias vim=nvim
export EDITOR=nvim
# executables
export PATH="$HOME/.local/bin:$PATH"
if [[ -f "$HOME/.deno" ]]; then
export DENO_INSTALL="$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
fi
if [[ -f "$HOME/.gem/ruby/2.6.0/bin" ]]; then
export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"
fi
if [[ -f "$(which go 2>/dev/null)" ]]; then
export PATH="$(go env GOPATH)/bin:$PATH"
fi
if [[ -f "$(which cargo 2>/dev/null)" ]]; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
# completion
autoload -U compinit; compinit
autoload -U +X bashcompinit && bashcompinit
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
if [[ -f "$(which mc 2>/dev/null)" ]]; then
complete -o nospace -C mc mc
fi
if [[ -f "$(which kubectl 2>/dev/null)" ]]; then
source <(kubectl completion zsh)
fi
# platform specific
case "$(uname -s)" in
Darwin) PLATFORM_DARWIN=true;;
*) PLATFORM_LINUX=true;;
esac
if $PLATFORM_DARWIN; then
export PATH="$PATH:$HOME/Library/Python/3.8/bin"
fi
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
if [[ -f "$HOME/.iterm2_shell_integration.zsh" ]]; then
source "$HOME/.iterm2_shell_integration.zsh"
fi
alias icat="imgcat"
fi
if [[ "$TERM" == "xterm-kitty" ]]; then
alias icat="kitty +kitten icat"
alias ssh="kitty +kitten ssh"
fi
# directory listings
export LS_COLORS='no=00:fi=00:di=36:ow=34;40:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.hpp=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.cl=32:*.sh=32:*.bash=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.go=32:*.sql=32:*.csv=32:*.sv=32:*.svh=32:*.v=32:*.vh=32:*.vhd=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.PNG=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.nef=33:*.NEF=33:*.aac=33:*.au=33:*.flac=33:*.m4a=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.opus=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.MOV=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.webm=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.odt=31:*.dot=31:*.dotx=31:*.ott=31:*.xls=31:*.xlsx=31:*.ods=31:*.ots=31:*.ppt=31:*.pptx=31:*.odp=31:*.otp=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.zst=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;33:*.BAK=01;33:*.old=01;33:*.OLD=01;33:*.org_archive=01;33:*.off=01;33:*.OFF=01;33:*.dist=01;33:*.DIST=01;33:*.orig=01;33:*.ORIG=01;33:*.swp=01;33:*.swo=01;33:*.v=01;33:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:*.sqlite=34:'
export CLICOLOR=1
export TIME_STYLE=iso
@ -23,16 +83,29 @@ if [[ -f "$(which exa)" ]]; then
alias ls=exa
fi
autoload -U compinit; compinit
autoload -U +X bashcompinit && bashcompinit
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
# prompt
# prompt: vcs
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
setopt prompt_subst
zstyle ':vcs_info:git:*' formats ' %b '
zstyle ':vcs_info:git:*' formats $' %b %u%c'
zstyle ':vcs_info:git:*' actionformats $'%(u..%B)%(c..%B) %u%c %b (%a) '
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true
format_vcs_info() {
text="$1"
dirty=false
while [[ "${text[-2]}" == " " ]]; do
dirty=true
text="${text[0,-2]}"
done
if $dirty; then
echo "%B$text%b"
else
echo "$text"
fi
}
# prompt: return code
format_return_code() {
return_code_=$1
@ -83,15 +156,17 @@ if [[ ! -z "$SSH_CLIENT" ]]; then
PROMPT_USER_MACHINE=$'@%m'
fi
PROMPT_USER=$'%F{15}%{\e[3m%}%(!.%K{9}.%K{4}) %n'"$PROMPT_USER_MACHINE"$' %k%{\e[0m%}%f'
PROMPT_HISTORY=$'%F{11}%{\e[3m%} %h %{\e[0m%}%f'
PROMPT_HISTORY=$'%F{10}%{\e[3m%} %h %{\e[0m%}%f'
PROMPT_ERROR=$'%F{15}%{\e[3m%}%(?.%K{2}.%K{1} $(format_return_code $?) )%k%{\e[0m%}%f'
PROMPT_ERROR_PREV=$'$(format_return_code_prev $?)'
PROMPT_VCS=$'%B%K{8}$vcs_info_msg_0_%k%b'
PROMPT_VCS=$'%K{8}$(format_vcs_info $vcs_info_msg_0_)%k'
PROMPT_DIRECTORY=$'%K{black} %2~ %k'
PROMPT_VI=$'%F{15}%{\e[3m%}$zle_vi_mode_%{\e[0m%}%f'
RPROMPT="$PROMPT_HISTORY$PROMPT_USER"
PROMPT="$PROMPT_VI$PROMPT_VCS$PROMPT_DIRECTORY "
# command entry plugins
AUTOSUGGESTIONS="/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
if [[ -f "$AUTOSUGGESTIONS" ]]; then
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'
@ -107,43 +182,7 @@ if [[ -f "$(which thefuck)" ]]; then
eval $(thefuck --alias nope)
fi
export PATH="$HOME/.local/bin:$PATH"
if [[ -f "$HOME/.deno" ]]; then
export DENO_INSTALL="$HOME/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
fi
if [[ -f "$HOME/.gem/ruby/2.6.0/bin" ]]; then
export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"
fi
if [[ -f "$(which go 2>/dev/null)" ]]; then
export PATH="$(go env GOPATH)/bin:$PATH"
fi
if [[ -f "$(which cargo 2>/dev/null)" ]]; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
if [[ -f "$(which mc 2>/dev/null)" ]]; then
complete -o nospace -C mc mc
fi
if [[ -f "$(which kubectl 2>/dev/null)" ]]; then
source <(kubectl completion zsh)
fi
if [[ "$(uname -s)" == "Darwin" ]]; then
export PATH="$PATH:$HOME/Library/Python/3.8/bin"
fi
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
if [[ -f "$HOME/.iterm2_shell_integration.zsh" ]]; then
source "$HOME/.iterm2_shell_integration.zsh"
fi
alias icat="imgcat"
fi
if [[ "$TERM" == "xterm-kitty" ]]; then
alias icat="kitty +kitten icat"
alias ssh="kitty +kitten ssh"
fi
# helper scripts
function gpg_start {
# gpg tty fix for macOS pinentry. also ensures agent is started