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
<# | |
.SYNOPSIS | |
Copy files using your clipboard and PowerShell | |
.DESCRIPTION | |
The file specified at $Path is converted to a base64 string, wrapped with a tiny script that converts the base64 string | |
back to binary and saves it at the path specified in the $Destination parameter | |
#> | |
function Copy-PasteItem { | |
[CmdletBinding()] |
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
<html> | |
<body> | |
<table style="width: 100%; overflow-x: hidden; table-layout: fixed;"> | |
<tbody> | |
<tr> | |
<td style="text-align: center; width: 200px; border-right: solid;"> | |
<h1>Product</h1> | |
<img src="https://media.haworth.com/image/117471/s800/fern_linkedin_50x50_1-(1).jpg" style="max-height: 100px;" /> | |
</td> | |
<td style="padding-left: 20px"> |
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
## Git | |
cinst -y git.install | |
cinst -y poshgit | |
cinst -y Git-Credential-Manager-for-Windows | |
cinst -y visualstudiocode |
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
$Port = "8080" | |
netstat -a -n -o | where { $_ -match $Port } | foreach { | |
$Process = Get-Process -PID (($_ -replace "\s+"," ") -split " ")[-1] | |
"Process: $($Process.ProcessName) ($($Process.Id)) is using $Port" | |
} |
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
$Port = "8080" | |
netstat -a -n -o | where { $_ -match $Port } | foreach { | |
$Process = Get-Process -PID (($_ -replace "\s+"," ") -split " ")[-1] | |
"Process: $($Process.ProcessName) ($($Process.Id)) is using $Port" | |
} |
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
#!/bin/pwsh | |
Install-Module -Name Get-ChildItemColor, oh-my-posh, posh-git, nvm -Force | |
md ~\.config\powershell | |
"Set-Theme -name Darkblood" | Out-File $Profile -Append | |
Install-NodeVersion 8 | |
Install-NodeVersion 10 |
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
# Configure Windows | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Update-ExecutionPolicy Unrestricted | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
Install-Module -Name Get-ChildItemColor,posh-git,terminal-icons -Force | |
## Git | |
winget install -e --accept-source-agreements --silent --accept-package-agreements --id Git.Git |
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
$user32 = Add-Type -Name 'user32' -Namespace 'Win32' -PassThru -MemberDefinition @' | |
[DllImport("user32.dll")] | |
public static extern int GetWindowLong(IntPtr hWnd, int nIndex); | |
[DllImport("user32.dll")] | |
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); | |
[DllImport("user32.dll", SetLastError = true)] | |
public static extern bool SetLayeredWindowAttributes(IntPtr hWnd, uint crKey, int bAlpha, uint dwFlags); |
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
using namespace Microsoft.AspNetCore.Builder; | |
using namespace Microsoft.AspNetCore.Http; | |
using namespace System; | |
using namespace Microsoft.AspNetCore.Hosting; | |
# If you don't have Visual Studio Installed this should work fine | |
# Install-Package Microsoft.AspNetCore -Source nuget.org -Destination .\.nuget\packages | |
# Install-Package Microsoft.AspNetCore.Server.Kestrel -Source nuget.org -Destination .\.nuget\packages | |
$LibFolder = "" |
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
$FilePaths = @() | |
$FilePaths = (Get-WmiObject win32_process -filter "name like 'notepad.exe'") | | |
foreach { ($_.commandline -split " ",2)[1] } | |
if($FilePaths.count -gt 1) { | |
$FilePath = $FilePaths | Out-GridView -PassThru -Title "Select the open file you would like to search" | |
} else { | |
$FilePath = $FilePaths | |
} |