- Show all installed extensions:
code --list-extensions | xargs -L 1 echo code --install-extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($PSVERSIONTABLE.PSVersion -lt [version]'7.3.0'){ | |
Write-Error "Update PowerShell. Try choco upgrade powershell-core -y, winget, or scoop install" | |
return | |
} | |
Write-Host "Updating CurrentUserAllHosts to have the required environment variables to properly load binaries managed by Aqua" -ForegroundColor Green | |
$ENV:PATH = (Join-Path $(go env GOPATH) 'bin'), $ENV:PATH -join [IO.Path]::PathSeparator | |
$ENV:XDG_DATA_HOME="${HOME}/.local/share | |
[string]$RootLocation = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This should go into the $PROFILE file. Open in code easily with `code $PROFILE` in a powershell terminal. | |
if (-not (Get-InstalledModule PSReadline -ErrorAction SilentlyContinue)) { | |
Install-Module PSReadline -Force -Confirm:$false -Scope CurrentUser -AllowPrerelease | |
} | |
if (-not (Get-Module PSReadline)) { | |
Import-Module PSReadline -DisableNameChecking -Global -Force | |
} | |
Set-PSReadLineOption -EditMode Windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# starts (or restarts) a 1password cli session, sets 30 minute countdown variable | |
# use: OP_CLOUD_ACCOUNT="[your-account-name]" source /path/to/op_session.sh command | |
# e.g.: OP_CLOUD_ACCOUNT="familyname" source ~/op_session.sh get account | |
check_session(){ | |
# attempt sign in if session is not active |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# parserPreset: conventional-changelog-conventionalcommits | |
rules: | |
body-leading-blank: | |
- 0 | |
- always | |
body-max-line-length: | |
- 0 | |
- always | |
- 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// requires go 1.18 | |
import ( | |
"os" | |
"fmt" | |
) | |
func info(format string, a ...any) (n int, err error) { | |
return fmt.Fprintf(os.Stdout, format + "\n", a...) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
setopt extended_glob | |
set +e | |
export ZDOTDIR=$HOME/.config/zsh | |
zfiles=( "$HOME/.zlogin" "$HOME/.zlogout" "$HOME/.zpreztorc" "$HOME/.zprofile" "$HOME/.zsh_history" "$HOME/.zshenv" "$HOME/.zshrc" ) | |
echo "$zfiles" | |
mkdir -p ~/.bak | |
for zfile in "${zfiles[@]}"; do | |
echo "backing up $zfile" | |
(cp $zfile ~/.bak 2>/dev/null || true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes" | |
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" | |
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" |
I've had issues with them toggling back on and causing conflict.
Download the json from settings backup, parse to the disabled extensions and then forcibly uninstall to ensure no further sync issue.
cat extensions.uninstall.json | jq '.[] | select(.disabled==true)' | jq '.identifier.id' -r | while read -r key; read -r val; do
code-insiders --uninstall-extension $val
done