There are four user levels to using a GUI framework:
- View composition
- Custom interactions
- Custom widgets
- Framework Development
<# | |
.SYNOPSIS | |
BoxStarter script to configure Windows 10 development PC. | |
.DESCRIPTION | |
You might need to set: | |
Set-ExecutionPolicy RemoteSigned | |
Set-ExecutionPolicy Unrestricted | |
Set-ExecutionPolicy Bypass |
There are some rules regarding which functions can be used in in Chocolatey packages hosted on the community repository. Basically, any function not available in PowerShell v2.0 can not be used (without a fallback helper). In this gist I want to keep a list of functions that were not available in PowerShell 2.0, or I have found that did not work as expected.
Convert-FromJson
- while it is a common function nowadays, this was only added in PowerShell 3.0 and can not be used in a community package.Get-ItemPropertyValue
- added in PowerShell 5.0, and do not exist on the Chocolatey verifier.Import-Certificate
- Only available on some Server platforms (and Windows 10). As an alternative the linked fallback helper can be used insteadHow to enable function keys
echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode
https://blog.colinwaddell.com/keychron-function-keys-configuration/
function Get-NeedsArgvQuote { | |
<# | |
.DESCRIPTION Fix up our argument string for the insane CommandLineToArgvW rules | |
.LINK https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way | |
#> | |
[CmdletBinding()] | |
param( | |
[Parameter(Position=0,Mandatory=1)][AllowEmptyString()][string]$arg | |
) | |
if ([System.String]::IsNullOrEmpty($arg)) { |
# this snippet describes how to automatically clean up | |
# changes in environment varables | |
# it can clean up re-writing, adding and removing | |
# scroll down to see how to use it in real test | |
Get-Module Pester | Remove-Module | |
Import-Module Pester -MaximumVersion 4.9.9 | |
function Get-Environment { | |
$vars = Get-Item Env:\ |
The goal of this gist is to provide some details on what you can do and can't do on chocolatey.org when you are a maintainer.
function Get-AuthorizationHeader | |
{ | |
[cmdletbinding()] | |
Param( | |
[Parameter( | |
ValueFromPipeline)] | |
[PSCredential] | |
$Credential | |
) |
<# | |
.SYNOPSIS | |
BoxStarter script to configure Windows 10 development PC. | |
.DESCRIPTION | |
Install BoxStarter: | |
. { Invoke-WebRequest -useb http://boxstarter.org/bootstrapper.ps1 } | Invoke-Expression; get-boxstarter -Force | |
Run by calling the following from an **elevated** command-prompt. | |
Remove -DisableReboots parameter to allow the script to reboot as required. |
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.