For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| #!/bin/bash | |
| # This program is free software. It comes without any warranty, to the extent permitted | |
| # by applicable law. You can redistribute it and/or modify it under the terms of the | |
| # Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. | |
| # See http://sam.zoy.org/wtfpl/COPYING for more details. | |
| # https://misc.flogisoft.com/bash/tip_colors_and_formatting | |
| #Background |
| # powershell completion for gh -*- shell-script -*- | |
| function __gh_debug { | |
| if ($env:BASH_COMP_DEBUG_FILE) { | |
| "$Args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" | |
| } | |
| } | |
| filter __gh_escapeStringWithSpecialChars { | |
| $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' |
| function Invoke-ReArmLicense { | |
| [CmdletBinding(DefaultParameterSetName='Rearm')] | |
| [Alias('ReArm')] | |
| param( | |
| [Parameter()] | |
| [ValidateScript({ | |
| if (-not (Test-Connection -Quiet -Count 1 -ComputerName $_)) { | |
| throw '{0} - Computer Unavailable' -f $_ | |
| } | |
| return $true |
| function Get-MsiProducts { | |
| [CmdletBinding(SupportsShouldProcess)] | |
| Param() | |
| $Installer = New-Object -ComObject WindowsInstaller.Installer | |
| $Type = $Installer.GetType() | |
| $Products = $Type.InvokeMember('Products', [System.Reflection.BindingFlags]::GetProperty, $null, $Installer, $null) | |
| $MsiProducts = foreach ($Product In $Products) { | |
| try { | |
| $MsiProduct = New-Object -TypeName PSObject -Property @{ProductCode = $Product} | |
| $MsiProperties = @('ProductName', 'VersionString', 'InstallDate', 'PackageName', 'Publisher', 'PackageCode', 'InstallSource', 'LocalPackage', 'ProductIcon') |
| # Get Default User-Agent | |
| # https://get-powershellblog.blogspot.com/2017/12/powershell-core-web-cmdlets-in-depth_24.html#L05 | |
| #(Invoke-RestMethod -Uri https://httpbin.org/headers).Headers.'User-Agent' | |
| Invoke-RestMethod -Uri 'ifconfig.me/ua' | |
| [Microsoft.PowerShell.Commands.PSUserAgent].GetMembers('Static, NonPublic').Where{$_.Name -eq 'UserAgent'}.GetValue($null,$null) |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetHelp_8wekyb3d8bbwe] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Getstarted_8wekyb3d8bbwe] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe] | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion |
| cd() { | |
| # Check if no arguments to make just typing cd<Enter> work | |
| # Also check if the first argument starts with a - and let cd handle it | |
| if [ $# -eq 0 ] || [[ $1 == -* ]] | |
| then | |
| builtin cd $@ | |
| return | |
| fi | |
| # If path exists, just cd into it | |
| # (also, using $* and not $@ makes it so you don't have to escape spaces any more) |