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 -a && source .env && set +a |
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
ls -Directory -Recurse -Depth 4 |? Name -In obj,bin | rm -Force -Recurse |
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
<system.diagnostics> | |
<sharedListeners> | |
<add name="file" | |
autoFlush="true" | |
append="false" | |
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | |
customLocation="c:\temp" | |
location="Custom" | |
logFileCreationSchedule="Daily" | |
baseFileName="Log"/> |
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
# get a version string based on the current date & time | |
# https://gist.github.com/twolfson/de1b004dd22536b8e668 | |
(Get-Date -AsUTC).ToString('yyyyMMdd.hhmmss.fffffff00') |
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
# https://github.com/github/gitignore | |
npx gitignore node |
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
aws sts get-caller-identity |
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 environment variables from a file | |
cat ./vars.env | ConvertFrom-StringData |? Values -ne @{} |% {ni -Name $_.Keys -Value $_.Values -Path env: -Force} |
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
fd --no-ignore System.Collections.Immutable.dll | gi |% { | |
[pscustomobject]@{name=$_; version=[Reflection.AssemblyName]::GetAssemblyName($_).Version }} |
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
Function Use-LSColors { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[string]$LSColors | |
) | |
$LSColors -Split ":" | % { | |
$param, $arg = $_ -Split "=" |
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
# lazy load posh-git | |
Register-ArgumentCompleter -Native -CommandName 'git' -ScriptBlock { | |
if (!(gmo posh-git)) { Expand-GitCommand ($args[1] -replace '^git\W*', '') } | |
} |
OlderNewer