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
######## POSH-GIT | |
# with props to https://bradwilson.io/blog/prompt/powershell | |
# | |
# | |
# Now for this to work most beautifully - you will need to have the latest posh-git module | |
# | |
# You will also need the MesloLGM Nerd Font Mono font | |
# from here https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Meslo/M/Regular/complete/Meslo%20LG%20M%20Regular%20Nerd%20Font%20Complete.ttf | |
# if you are super nerdy | |
# or |
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
#region UX config | |
Import-Module posh-git | |
if (Get-Module PSReadLine) { | |
Import-Module oh-my-posh | |
$ThemeSettings.MyThemesLocation = "~/.config/powershell/oh-my-posh/Themes" | |
if (Get-Theme | Where-Object Name -eq Sorin-NL) { | |
Set-Theme Sorin-NL |
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
$parameters = @{ | |
Key = 'F7' | |
BriefDescription = 'ShowMatchingHistoryOcgv' | |
LongDescription = 'Show Matching History using Out-ConsoleGridView' | |
ScriptBlock = { | |
param($key, $arg) # The arguments are ignored in this example | |
$line = $null | |
$cursor = $null | |
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$line, [ref]$cursor) | |
$history = [Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems().CommandLine | Select-Object -Unique |
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
{ | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
This python guide is intended to those who already know python and want a mind refresh or looking for a specific syntax.
-as this guide doesn't elaborate in explaining thing that a programmer would already know -like: variable, function, csv, json-
additionally, this guide is not intended to be a replacement for reading official Python documentation.
guide version: 2.1.0 | python version: 3.10
| Part of Version | Explanation |
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
#requires -version 7.2 | |
using namespace system.collections.generic | |
using namespace system.reflection | |
function record { | |
param ( | |
[Parameter(Mandatory)][String]$Name, | |
[Parameter(Mandatory)][hashtable]$Properties, | |
[switch]$ReadOnly | |
) |