-
-
Save perXautomatik/a3f064f0c3ad8e2c7499a119d5d1dffc to your computer and use it in GitHub Desktop.
Windows10用の環境構築時のコマンドまとめ
This file contains 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
# -- Modules -------------------------------------------------- | |
Import-Module posh-git | |
Import-Module oh-my-posh | |
Set-Theme Agnoster | |
Import-Module DockerCompletion | |
Import-Module scoop-completion | |
Import-Module PSColor | |
# ZLocation alternates your prompt function to track the location. | |
# If you have a custom prompt function in $profile, you should place Import-Module ZLocation after the prompt customization. | |
Import-Module ZLocation | |
# -- Alias ---------------------------------------------------- | |
# Aliases provided by profile.ps1 | |
$ProfileAliases = @{ } | |
# Scoop | |
$ProfileAliases += @{ | |
sup = { scoop update $args } | |
supa = { scoop update * } | |
sse = { scoop search $args } | |
sli = { scoop list $args } | |
sinst = { scoop install $args } | |
srm = { scoop uninstall $args } | |
spurge = { scoop cleanup * --cache } | |
swi = { scoop which $args } | |
} | |
# Chocolatey | |
$ProfileAliases += @{ | |
cll = { clist --local-only $args } | |
} | |
# Scoop + Chocolatey | |
$ProfileAliases += @{ | |
up = { sudo cup -y all; supa } | |
} | |
# Git | |
$ProfileAliases += @{ | |
clone = { git clone $args } | |
pull = { git pull $args } | |
fet = { git fetch $args } | |
sw = { git switch $args } | |
add = { git add $args } | |
addd = { add -u $args } | |
cm = { git commit $args } | |
push = { git push $args } | |
st = { git status $args } | |
stt = { st -uno $args } | |
gr = { git log $args --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s' } | |
grall = { gr --all $args } | |
gdiff = { git diff $args } | |
gwdiff = { gdiff --word-diff $args } | |
} | |
# csv | |
$ProfileAliases += @{ | |
ipcsv8 = { Import-Csv -Encoding utf8 $args } | |
epcsv8 = { Export-Csv -Encoding utf8 $args -NoTypeInformation } | |
} | |
# Java Development | |
$ProfileAliases += @{ | |
mvninst = { mvn -DskipTests clean install } | |
} | |
$ProfileAliases.Keys | ForEach-Object { | |
'function ' + $_ + '() {' + $ProfileAliases[$_] + '}' | Invoke-Expression | |
} |
This file contains 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
Set-ExecutionPolicy RemoteSigned -scope CurrentUser | |
$windows10_setup = 'https://gist.githubusercontent.com/nimzo6689/c7f6129095536908e9e2b6aaabcc802b/raw/d8fd7880262b9c6d1e6ae0a3fae2c21152341b61/windows10-setup.ps1' | |
$conemu_config = 'https://gist.githubusercontent.com/nimzo6689/d1b1359c4faf34fc72898c05c0b213b6/raw/a6e710b4ea3165ef273cfd1c8b8e0e09a2b51858/ConEmu.xml' | |
# windows10-setup.ps1 | |
iwr -useb $windows10_setup | iex | |
# ConEmuの設定ファイルを適用 | |
iwr -useb $conemu_config | Out-File -Encoding utf8 -Path ~\scoop\persist\conemu\ConEmu.xml |
This file contains 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
$profile_script = 'https://gist.githubusercontent.com/nimzo6689/c7f6129095536908e9e2b6aaabcc802b/raw/8cd8208824b8ba5fffa0ababd3319f689740bde6/Profile.ps1' | |
iwr -useb get.scoop.sh | iex | |
scoop install git aria2 | |
scoop bucket add extras | |
scoop config aria2-enabled true | |
scoop install sudo pwsh vscode rapidee ConEmu | |
# For Windows10 initial settings | |
scoop bucket add Ash258 | |
scoop install Win10InitialSetup | |
Import-Module "$(scoop prefix Win10InitialSetup)\Win10.psm1" | |
ShowKnownExtensions | |
pwsh -Command '@('posh-git', 'oh-my-posh', 'ZLocation', 'DockerCompletion', 'scoop-completion', 'PSColor') | % {Install-Module -Force -AllowClobber -Scope CurrentUser $_}' | |
pwsh -Command ('Add-Content -Value ' + (iwr -useb $profile_script) + ' -Encoding UTF8 -Path $profile.CurrentUserAllHosts') | |
code --install-extension davidhouchin.whitespace-plus | |
code --install-extension editorconfig.editorconfig | |
code --install-extension esbenp.prettier-vscode | |
code --install-extension aaron-bond.better-comments | |
code --install-extension eamodio.gitlens | |
code --install-extension ryu1kn.partial-diff | |
code --install-extension mechatroner.rainbow-csv | |
code --install-extension ms-vscode.powershell | |
code --install-extension bmewburn.vscode-intelephense-client | |
code --install-extension spences10.vba | |
code --install-extension msjsdiag.debugger-for-chrome | |
code --install-extension ms-azuretools.vscode-docker | |
code --install-extension ms-vscode-remote.remote-containers | |
Register-PSRepository -Name PSGallery -SourceLocation https://www.powershellgallery.com/api/v2/ -InstallationPolicy Trusted | |
Register-PackageSource -Name Nuget -Location "http://www.nuget.org/api/v2" –ProviderName Nuget -Trusted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment