Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git #162

Merged
merged 5 commits into from
Nov 13, 2023
Merged

Git #162

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .chezmoiexternal.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ url = "https://raw.githubusercontent.com/nushell/nushell/0.86.0/crates/nu-utils/
[".local/share/nushell/default_config.nu"]
type = "file"
url = "https://raw.githubusercontent.com/nushell/nushell/0.86.0/crates/nu-utils/src/sample_config/default_config.nu"
[".local/share/gitalias/gitalias.txt"]
type = "file"
url = "https://raw.githubusercontent.com/GitAlias/gitalias/main/gitalias.txt"
3 changes: 3 additions & 0 deletions dot_config/git/config
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@

[includeIf "gitdir:/workspaces/"]
path = codespace

[include]
path = ~/.local/share/gitalias/gitalias.txt
11 changes: 10 additions & 1 deletion dot_config/nushell/scripts/aliases.nu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export alias g = git
export alias a = git add -p
export alias b = git branch
export alias c = git commit -m
export alias s = git status
export alias s = git status --show-stash
export alias m = git merge
export alias p = git push
export alias u = git pull
Expand Down Expand Up @@ -43,8 +43,17 @@ export alias stash = git stash
export alias wip = git commit -am "WIP"
export alias fixup = git commit --fixup
export alias unpushed = git log --branches --not --remotes --no-walk --decorate --oneline
export alias stashes = git stash list
export alias untracked = git status --untracked

export def unclean [] { gfold -d json ~/Code | from json | where status != Clean }

export def undone [] {
untracked
unpushed
stashes
}

export alias vi = hx
export alias vim = vi
export alias nvim = vi
Expand Down
31 changes: 31 additions & 0 deletions dot_config/nushell/scripts/aws-cluster-config.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export def main [] {
with-env [
AWS_PROFILE "infrastructure-testing-service-account"
AWS_REGION "us-east-1"
TEA_DIR $env.HOME
] {

tea -E aws configure

(
tea -E
aws eks update-cluster-config
--name infrastructure
--resources-vpc-config $'{"publicAccessCidrs": ["(http get https://ifconfig.me/ip)/32"]}'
)

(
tea -E
aws eks update-kubeconfig
--name infrastructure
)

open ~/.kube/config
| from yaml
| update users.user.exec.command "tea"
| update users.user.exec.args {|config| $config.users.user.exec.args | flatten | prepend "aws"}
| to yaml
| save -f ~/.kube/config
}
}