Skip to content

Commit 3231ef1

Browse files
committed
Update dotfiles
1 parent 1b9db24 commit 3231ef1

File tree

11 files changed

+137
-55
lines changed

11 files changed

+137
-55
lines changed

Brewfile

+8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
tap "1password/tap"
22
tap "boz/repo"
3+
tap "hashicorp/tap"
34
tap "homebrew/bundle"
45
tap "homebrew/services"
56
tap "koekeishiya/formulae"
7+
tap "oven-sh/bun"
68
brew "awscli"
79
brew "bat"
810
brew "btop"
@@ -16,6 +18,7 @@ brew "gh"
1618
brew "git"
1719
brew "glow"
1820
brew "gnupg"
21+
brew "go"
1922
brew "gping"
2023
brew "helm"
2124
brew "htop"
@@ -29,6 +32,7 @@ brew "mtr"
2932
brew "ncdu"
3033
brew "neofetch"
3134
brew "neovim"
35+
brew "nmap"
3236
brew "oha"
3337
3438
brew "pinentry-mac"
@@ -40,10 +44,14 @@ brew "stow"
4044
brew "telnet"
4145
brew "tmux"
4246
brew "watch"
47+
brew "yt-dlp"
48+
brew "hashicorp/tap/packer"
4349
brew "koekeishiya/formulae/skhd"
50+
brew "oven-sh/bun/bun"
4451
cask "1password-cli"
4552
cask "kitty"
4653
cask "nrlquaker-winbox"
54+
cask "orbstack"
4755
mas "Keynote", id: 409183694
4856
mas "LightBlue", id: 557428110
4957
mas "Medis", id: 1579200037

git/.gitconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
[core]
77
excludesfile = /Users/tim/.gitignore_global
88

9-
[url "ssh://[email protected]/"]
10-
insteadOf = https://github.com/
9+
; [url "ssh://[email protected]/"]
10+
; insteadOf = https://github.com/
1111

1212
[init]
1313
defaultBranch = main

nvim/.config/nvim/ftplugin/go.vim

-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
11
set backspace=indent,eol,start
22

3-
let g:go_fmt_command = "goimports"
4-
let g:go_highlight_functions = 1
5-
let g:go_highlight_methods = 1
6-
let g:go_highlight_structs = 1
7-
let g:go_highlight_operators = 1
8-
let g:go_highlight_function_parameters = 1
9-
let g:go_highlight_function_calls = 1
10-
let g:go_highlight_types = 1
11-
let g:go_highlight_fields = 1
12-
let g:go_highlight_build_constraints = 1
13-
let g:go_def_mode='gopls'
14-
let g:go_info_mode='gopls'
15-
let g:go_def_mapping_enabled = 0
16-
let g:go_fmt_autosave = 1
17-
18-
autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=2 shiftwidth=2
19-
203
nnoremap <leader>r :!tmux send-keys -t 1 C-c "clear; go run *.go" C-m<CR><C-L>

nvim/.config/nvim/init.lua

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require('custom.telescope')
77
require('custom.treesitter')
88
require('custom.discord')
99
require('custom.null_ls')
10+
require('custom.go')
1011

1112
vim.opt.termguicolors = true
1213

nvim/.config/nvim/lua/custom/go.lua

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
2+
3+
require ('go').setup({
4+
goimport = 'gopls',
5+
gofmt = 'gopls',
6+
max_line_len = 120,
7+
tag_transform = false,
8+
lsp_cfg = {
9+
capabilities = capabilities,
10+
},
11+
lsp_inlay_hints = {
12+
enable = true,
13+
only_current_line = true,
14+
},
15+
lsp_gofumpt = true,
16+
lsp_on_attach = true,
17+
dap_debug = false,
18+
})
19+
20+
local format_sync_grp = vim.api.nvim_create_augroup("GoImport", {})
21+
vim.api.nvim_create_autocmd("BufWritePre", {
22+
pattern = "*.go",
23+
callback = function()
24+
require('go.format').goimport()
25+
end,
26+
group = format_sync_grp,
27+
})

nvim/.config/nvim/lua/custom/keys.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vim.g.mapleader = ","
2-
vim.keymap.set('n', '<leader>o', '<cmd>!tmux splitw -h -p 30 -c $(pwd)<cr><c-l>')
2+
vim.keymap.set('n', '<leader>o', '<cmd>!tmux splitw -h -l 30\\% -c $(pwd)<cr><c-l>')
33
vim.keymap.set('n', '<leader>t', '<cmd>!tmux send-keys -t 1 C-c<cr><c-l>')
44

55
require('Comment').setup({

nvim/.config/nvim/lua/custom/lsp.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ vim.api.nvim_create_autocmd('LspAttach', {
3131
vim.opt.completeopt = {'menuone', 'noselect'}
3232

3333
require("mason").setup()
34-
require("mason-lspconfig").setup()
34+
require("mason-lspconfig").setup({
35+
ensure_installed = { "tsserver", "rust_analyzer", "tailwindcss", "gopls" },
36+
})
3537

3638
lsp.rust_analyzer.setup{
3739
procMacro = {

nvim/.config/nvim/lua/plugins.lua

+25-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,31 @@ return require('packer').startup(function(use)
5858
use 'folke/todo-comments.nvim'
5959

6060
use 'rust-lang/rust.vim'
61-
use 'tpope/vim-fugitive'
62-
use 'airblade/vim-gitgutter'
61+
use "sindrets/diffview.nvim"
62+
63+
use {
64+
"NeogitOrg/neogit",
65+
requires = {
66+
"nvim-lua/plenary.nvim",
67+
"sindrets/diffview.nvim",
68+
"nvim-telescope/telescope.nvim"
69+
},
70+
config = function() require("neogit").setup() end
71+
}
72+
use {
73+
"lewis6991/gitsigns.nvim",
74+
config = function()
75+
require("gitsigns").setup({
76+
current_line_blame = true,
77+
current_line_blame_opts = {
78+
delay = 100
79+
}
80+
})
81+
end
82+
}
83+
84+
use 'ray-x/guihua.lua'
85+
use 'ray-x/go.nvim'
6386

6487
use 'pantharshit00/vim-prisma'
6588

nvim/.config/nvim/plugin/packer_compiled.lua

+45-20
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ local function save_profiles(threshold)
4949
end
5050

5151
time([[Luarocks path setup]], true)
52-
local package_path_str = "/Users/tim/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/tim/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/tim/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/tim/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
53-
local install_cpath_pattern = "/Users/tim/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
52+
local package_path_str = "/Users/tim/.cache/nvim/packer_hererocks/2.1.1703358377/share/lua/5.1/?.lua;/Users/tim/.cache/nvim/packer_hererocks/2.1.1703358377/share/lua/5.1/?/init.lua;/Users/tim/.cache/nvim/packer_hererocks/2.1.1703358377/lib/luarocks/rocks-5.1/?.lua;/Users/tim/.cache/nvim/packer_hererocks/2.1.1703358377/lib/luarocks/rocks-5.1/?/init.lua"
53+
local install_cpath_pattern = "/Users/tim/.cache/nvim/packer_hererocks/2.1.1703358377/lib/lua/5.1/?.so"
5454
if not string.find(package.path, package_path_str, 1, true) then
5555
package.path = package.path .. ';' .. package_path_str
5656
end
@@ -115,12 +115,33 @@ _G.packer_plugins = {
115115
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
116116
url = "https://github.com/saadparwaiz1/cmp_luasnip"
117117
},
118+
["diffview.nvim"] = {
119+
loaded = true,
120+
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/diffview.nvim",
121+
url = "https://github.com/sindrets/diffview.nvim"
122+
},
123+
["gitsigns.nvim"] = {
124+
config = { "\27LJ\2\n|\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\28current_line_blame_opts\1\0\1\ndelay\3d\1\0\1\23current_line_blame\2\nsetup\rgitsigns\frequire\0" },
125+
loaded = true,
126+
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
127+
url = "https://github.com/lewis6991/gitsigns.nvim"
128+
},
118129
["glow.nvim"] = {
119130
config = { "\27LJ\2\n2\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\tglow\frequire\0" },
120131
loaded = true,
121132
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/glow.nvim",
122133
url = "https://github.com/ellisonleao/glow.nvim"
123134
},
135+
["go.nvim"] = {
136+
loaded = true,
137+
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/go.nvim",
138+
url = "https://github.com/ray-x/go.nvim"
139+
},
140+
["guihua.lua"] = {
141+
loaded = true,
142+
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/guihua.lua",
143+
url = "https://github.com/ray-x/guihua.lua"
144+
},
124145
["lspkind-nvim"] = {
125146
loaded = true,
126147
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
@@ -141,6 +162,12 @@ _G.packer_plugins = {
141162
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/mason.nvim",
142163
url = "https://github.com/williamboman/mason.nvim"
143164
},
165+
neogit = {
166+
config = { "\27LJ\2\n4\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\vneogit\frequire\0" },
167+
loaded = true,
168+
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/neogit",
169+
url = "https://github.com/NeogitOrg/neogit"
170+
},
144171
["null-ls.nvim"] = {
145172
loaded = true,
146173
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
@@ -223,16 +250,6 @@ _G.packer_plugins = {
223250
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
224251
url = "https://github.com/folke/todo-comments.nvim"
225252
},
226-
["vim-fugitive"] = {
227-
loaded = true,
228-
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/vim-fugitive",
229-
url = "https://github.com/tpope/vim-fugitive"
230-
},
231-
["vim-gitgutter"] = {
232-
loaded = true,
233-
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
234-
url = "https://github.com/airblade/vim-gitgutter"
235-
},
236253
["vim-prisma"] = {
237254
loaded = true,
238255
path = "/Users/tim/.local/share/nvim/site/pack/packer/start/vim-prisma",
@@ -241,14 +258,6 @@ _G.packer_plugins = {
241258
}
242259

243260
time([[Defining packer_plugins]], false)
244-
-- Config for: nvim-cmp
245-
time([[Config for nvim-cmp]], true)
246-
require('custom.lsp')
247-
time([[Config for nvim-cmp]], false)
248-
-- Config for: Comment.nvim
249-
time([[Config for Comment.nvim]], true)
250-
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
251-
time([[Config for Comment.nvim]], false)
252261
-- Config for: glow.nvim
253262
time([[Config for glow.nvim]], true)
254263
try_loadstring("\27LJ\2\n2\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\tglow\frequire\0", "config", "glow.nvim")
@@ -257,6 +266,22 @@ time([[Config for glow.nvim]], false)
257266
time([[Config for nvim-autopairs]], true)
258267
try_loadstring("\27LJ\2\ne\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\21disable_filetype\1\0\0\1\2\0\0\trust\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
259268
time([[Config for nvim-autopairs]], false)
269+
-- Config for: Comment.nvim
270+
time([[Config for Comment.nvim]], true)
271+
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
272+
time([[Config for Comment.nvim]], false)
273+
-- Config for: nvim-cmp
274+
time([[Config for nvim-cmp]], true)
275+
require('custom.lsp')
276+
time([[Config for nvim-cmp]], false)
277+
-- Config for: gitsigns.nvim
278+
time([[Config for gitsigns.nvim]], true)
279+
try_loadstring("\27LJ\2\n|\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\28current_line_blame_opts\1\0\1\ndelay\3d\1\0\1\23current_line_blame\2\nsetup\rgitsigns\frequire\0", "config", "gitsigns.nvim")
280+
time([[Config for gitsigns.nvim]], false)
281+
-- Config for: neogit
282+
time([[Config for neogit]], true)
283+
try_loadstring("\27LJ\2\n4\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\vneogit\frequire\0", "config", "neogit")
284+
time([[Config for neogit]], false)
260285

261286
_G._packer.inside_compile = false
262287
if _G._packer.needs_bufread == true then

scripts/bin/sb

+24-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/bin/sh
2-
CONTEXT="gke_social-blade-website_us-east1_production"
2+
CONTEXT="socialblade"
33
NAMESPACE="default"
44
SOCIALBLADE_EPOCH="1202446179000"
55

66
sb_help(){
77
echo "Usage: sb <command> [options]\n"
88
echo "Commands:"
99
echo " snow Convert snowflake to timestamp"
10-
echo " fwd Port forward services"
1110
echo " sh Exec /bin/sh on a deployment"
1211
}
1312

@@ -17,18 +16,10 @@ sb_snow() {
1716
exit 1
1817
fi
1918

20-
epoch=$(($1 >> 23 + $SOCIALBLADE_EPOCH))
19+
epoch=$((($1 >> 23) + $SOCIALBLADE_EPOCH))
2120
date -r $(($epoch/1000))
2221
}
2322

24-
sb_fwd() {
25-
if [[ $# -eq 0 ]] ; then
26-
sudo -E kubefwd svc -x $CONTEXT -n $NAMESPACE
27-
else
28-
sudo -E kubefwd svc -x $CONTEXT -n $NAMESPACE -l "app in ($1)"
29-
fi
30-
}
31-
3223
sb_sh() {
3324
if [[ $# -eq 0 ]] ; then
3425
echo 'missing selector (try: deployments/web)'
@@ -55,6 +46,28 @@ sb_log() {
5546
fi
5647
}
5748

49+
sb_pull() {
50+
if [[ $# -eq 0 ]] ; then
51+
echo 'missing type web, api, realtime'
52+
exit 1
53+
fi
54+
55+
case $1 in
56+
web)
57+
gcloud compute instances list | grep sb-website | awk '{print $1}' | xargs -P 0 -I{} gcloud compute ssh t@{} --zone us-east1-d --command "sudo -u www-data git -C /var/www/html/socialblade.com pull"
58+
;;
59+
api)
60+
gcloud compute instances list | grep sb-api | awk '{print $1}' | xargs -P 0 -I{} gcloud compute ssh t@{} --zone us-east1-d --command "sudo -u www-data git -C /var/www/html/api pull"
61+
;;
62+
realtime)
63+
gcloud compute instances list | grep sb-realtime | awk '{print $1}' | xargs -P 0 -I{} gcloud compute ssh t@{} --zone us-east1-d --command "sudo -u www-data git -C /var/www/html/realtime pull"
64+
;;
65+
*)
66+
echo -n "Invalid Option: web, api, realtime"
67+
;;
68+
esac
69+
}
70+
5871
sub=$1
5972
case $sub in
6073
"" | "-h" | "--help")

zsh/.alias

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ alias icloud="~/Library/Mobile\ Documents/com~apple~CloudDocs/"
33
alias cat="bat --theme TwoDark"
44
# Remove all docker containers
55
alias dk="docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm"
6-
alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/volume clux/muslrust:stable'
6+
alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder'
77

88
if [ $TERM = 'xterm-kitty' ]; then
99
export PATH=/Applications/kitty.app/Contents/MacOS/kitty:$PATH

0 commit comments

Comments
 (0)