Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jessie-ross committed Aug 27, 2024
1 parent 809f2ab commit 47a04f6
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 20 deletions.
12 changes: 8 additions & 4 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files({ hidden =
nnoremap <leader>faf <cmd>lua require('telescope.builtin').find_files({ hidden = true, no_ignore = true })<cr>
nnoremap <leader>ft :Telescope<CR>
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>fag <cmd>lua require('telescope.builtin').live_grep({ additional_args = { "--hidden" } })<cr>
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
Expand All @@ -29,14 +30,17 @@ lua << EOF
local actions = require('telescope.actions')
require('telescope').setup {
defaults = {
file_sorter = require('telescope.sorters').get_fzy_sorter,
file_ignore_patterns = {"node_modules", ".git"},
color_devicons = true,
mappings = {
i = {
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
["<C-Q>"] = actions.add_to_qflist + actions.open_qflist,
["<M-Q>"] = actions.add_selected_to_qflist + actions.open_qflist,
["<C-h>"] = actions.which_key,
["<C-k>"] = actions.cycle_history_prev,
["<C-j>"] = actions.cycle_history_next,
["<up>"] = actions.move_selection_previous,
["<down>"] = actions.move_selection_next,
["<C-Q>"] = actions.smart_send_to_qflist + actions.open_qflist,
["<C-w>"] = actions.smart_add_to_qflist + actions.open_qflist,
},
}
},
Expand Down
40 changes: 40 additions & 0 deletions rp-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# setup
sudo echo 'jrpi' > /etc/hostname

# apps
sudo apt-get update
sudo apt-get install \
fail2ban \
kodi \
ufw \
vim

# ufw
sudo ufw allow ssh
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
sudo ufw status verbose

# ssh
mkdir -p ~/.ssh
if [ ! -f ~/.ssh/authorized_keys ]; then
curl https://raw.githubusercontent.com/jessie-ross/dot-files/main/public-keys/id_ed25519_20240608.pub >> ~/.ssh/authorized_keys
fi


echo <<SSHD_CONFIG > /etc/ssh/sshd_config
PermitRootLogin no
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
KbdInteractiveAuthentication no
UsePAM no
X11Forwarding no
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp internal-sftp
SSHD_CONFIG

sudo systemctl enable sshd

7 changes: 6 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ volta run npm install --quiet -g \
pyright

# Java as recommended by Clojure:
brew install --cask temurin@21
# brew install --cask temurin@21

# Rust
rustup-init -y
Expand Down Expand Up @@ -123,6 +123,11 @@ EOF
launchctl load me.scjr.CapslockBackspace.plist
fi

# Enable firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw \
--setglobalstate on \
--setstealthmode on

# 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
Expand Down
19 changes: 15 additions & 4 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ set clipboard=unnamed
set winminwidth=0 winminheight=0
set ttyfast lazyredraw

set splitbelow
set splitright
" set splitbelow
" set splitleft


set scrolloff=10
Expand Down Expand Up @@ -86,6 +86,8 @@ set omnifunc=syntaxcomplete#Complete


packadd cfilter
" Replaces tpope/commentary:
" packadd comment


" ## Vim-plug ##
Expand Down Expand Up @@ -146,11 +148,20 @@ Plug 'airblade/vim-gitgutter', { 'commit': 'e801371' }

Plug 'tommcdo/vim-exchange', { 'commit': 'd6c1e97' }

Plug 'eraserhd/parinfer-rust', {'do': 'cargo build --release'}
Plug 'eraserhd/parinfer-rust', {'do': 'cargo build --release', 'commit': 'd84828b'}

Plug 'dln/avro-vim', { 'commit': '3af1c69' }

Plug 'spolu/dwm.vim', { 'commit': '6149e58' }
" Plug 'spolu/dwm.vim', { 'commit': '6149e58' }
" <c-n> |:DWM_New|
" <c-c> |:DWM_Close|
" <c-space> |:DWM_Focus|
" <c-j> Move cursor clockwise to the next window
" <c-k> Move cursor counter-clockwise to the previous window
" <c-,> Rotate windows counter-clockwise
" <c-.> Rotate windows clockwise
" <c-h> Grow Master Pane Width
" <c-l> Shrink Master Pane Width

if has('nvim')
Plug 'nvim-lua/popup.nvim'
Expand Down
23 changes: 12 additions & 11 deletions zshrc.main
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ alias wpcom-rsync="rsync -az --delete --delete-after \
--exclude '.config' \
--exclude '.svn' \
--exclude '.git' \
--exclude 'node_modules' \
--exclude '.settings' \
--exclude 'wp-content/themes' \
--exclude 'wp-content/languages' \
Expand All @@ -135,19 +136,19 @@ alias wpcom-rsync="rsync -az --delete --delete-after \
--info=progress2"

function mcpull () {
wpcom-rsync wpcom-sandbox:/home/missioncontrol/public_html/ ~/code-primary/missioncontrol/
wpcom-rsync wpcom-sandbox:/home/missioncontrol/public_html/ ~/code-primary/missioncontrol-00/
}

function mcpush () {
wpcom-rsync ~/code-primary/missioncontrol/ wpcom-sandbox:/home/missioncontrol/public_html/
wpcom-rsync ~/code-primary/missioncontrol-00/ wpcom-sandbox:/home/missioncontrol/public_html/
}

function wppull () {
wpcom-rsync wpcom-sandbox:/home/wpcom/public_html/ ~/code-primary/wpcom/
wpcom-rsync wpcom-sandbox:/home/wpcom/public_html/ ~/code-primary/wpcom-00/
}

function wppush () {
wpcom-rsync ~/code-primary/wpcom/ wpcom-sandbox:/home/wpcom/public_html/
wpcom-rsync ~/code-primary/wpcom-00/ wpcom-sandbox:/home/wpcom/public_html/
}

# Uploads any modified file to your sandbox
Expand Down Expand Up @@ -196,17 +197,17 @@ function gst () {
}

function gc () {
REPO="$1"
N="${"${2}":-0}"
pushd ~/code-primary/$REPO*-0$N/
REPO="$1" && \
N="${"${2}":-0}" && \
pushd ~/code-primary/$REPO*-0$N/ && \
update_terminal_cwd
}

function gv () {
REPO="$1"
N="${"${2}":-0}"
pushd ~/code-primary/$REPO*-0$N/
update_terminal_cwd
REPO="$1" && \
N="${"${2}":-0}" && \
pushd ~/code-primary/$REPO*-0$N/ && \
update_terminal_cwd && \
vim .
}

Expand Down

0 comments on commit 47a04f6

Please sign in to comment.