$ git commit --amend --author="Author Name <[email protected]>"
or
$ git commit --amend --reset-author
#Requires -Version 4.0 | |
[CmdletBinding()] | |
Param( | |
[switch]$OnlineInstall = $false | |
) | |
<# | |
.NOTES |
#CommentFlag // | |
#InstallKeybdHook | |
// Author: Jarvis Prestidge | |
// Description: Simulates my preferred keyboard layout, similiar to that of the Pok3r 60% keyboard | |
// on any keyboard without programmable keys. i.e. my laptop ^^ | |
// <COMPILER: v1.1.22.00> | |
$ uname -r
function Prompt { | |
<# | |
.Synopsis | |
Your custom PowerShell prompt | |
# borrowing heavily from https://dbatools.io/prompt but formatting the execution time without using the DbaTimeSpanPretty C# type | |
.Description | |
Custom prompt that includes the following features: |
How would you count the "Lines of Code" in HowManyLines.ps1 below? Go ahead and look, I'll wait here. 😉 Do you count lines that have nothing but braces on them? Do you count opening and closing braces? Do you count the "else" line?
If we use the Language Parser to count lines, we can take every statement's begin and end line and then count how many unique lines have code on them. But suprisingly, the else
keyword doesn't show up as a token, because it's just part of the IfStatementAst
...
$Ast = [System.Management.Automation.Language.Parser]::ParseFile((Convert-Path "HowManyLines.ps1"), [ref]$Null, [ref]$Null)
// Mercules' Erentil FR4 breakdown | |
// https://www.reddit.com/r/DestinyTheGame/comments/cbxao7/massive_breakdown_of_erentil_fr4_including_stats/ | |
// Erentil FR4 | |
dimwishlist:item=3027844941&perks=194952923,3868766766,280464955,1600092898 | |
dimwishlist:item=3027844941&perks=194952922,3868766766,280464955,1600092898 | |
dimwishlist:item=3027844941&perks=194952923,2969185026,280464955,1600092898 | |
dimwishlist:item=3027844941&perks=194952922,2969185026,280464955,1600092898 | |
dimwishlist:item=3027844941&perks=194952923,3868766766,1645158859,1600092898 | |
dimwishlist:item=3027844941&perks=194952922,3868766766,1645158859,1600092898 |
# Unifi Controller Login Base URI | |
$uController = 'yourControllerIP' # e.g 'https://192.168.1.2:8443' | |
# Identifier of the site in UniFi. Set to default for the default site | |
$uSiteID = "default" | |
$uUsername = 'adminuser' # yourAdmin UserID | |
$uPassword = 'yourPassword' # yourAdmin User Password | |
$uAuthBody = @{"username" = $uUsername; "password" = $uPassword } | |
$uHeaders = @{"Content-Type" = "application/json" } |
function Get-DadJoke { | |
[cmdletBinding()] | |
Param() | |
process { | |
$header = @{ | |
Accept = "application/json" | |
} | |
$joke = Invoke-RestMethod -Uri "https://icanhazdadjoke.com/" -Method Get -Headers $header | |
using namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions | |
using namespace System.Management.Automation.Language | |
using namespace System.Management.Automation | |
using namespace System.Collections.Generic | |
using namespace System.Collections | |
[AttributeUsage("Property,Field")] | |
class SubscriptionNameCompleter : ArgumentCompleterAttribute { | |
# PowerShell expects you to write IArgumentCompleter and register them with this syntax: | |
# [ArgumentCompleter([MyIArgumentCompleter])] |