- kubectl commands:
# View the current context:
kubectl config current-context
| public static IQueryable<T> WhereIf<T>([NotNull] this IQueryable<T> query, bool condition, Expression<Func<T, bool>> predicate) | |
| { | |
| if (query == null) | |
| { | |
| throw new ArgumentNullException(nameof(query)); | |
| } | |
| return condition | |
| ? query.Where(predicate) | |
| : query; |
| Get-Command # Retrieves a list of all the commands available to PowerShell | |
| # (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
| Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
| Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
| Get-Help # Get all help topics | |
| Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
| Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
| Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
| public static string Slugify(this string input) | |
| { | |
| string str = input.RemoveDiacritics().ToLower(); | |
| // invalid chars | |
| str = Regex.Replace(str, @"[^a-z0-9\s-]", ""); | |
| // convert multiple spaces into one space | |
| str = Regex.Replace(str, @"\s+", " ").Trim(); | |
| // cut and trim | |
| str = str.Substring(0, str.Length <= 45 ? str.Length : 45).Trim(); | |
| // hyphens |
A complete guide to the PRD2Prod methodology and specialized prompt system for efficient product development from requirements to production deployment.