I hereby claim:
- I am mivano on github.
- I am mivano (https://keybase.io/mivano) on keybase.
- I have a public key ASBzhbvTYkTZ0AoYCqR-99I58z-TV-MCJUJXNrUpBBmBWAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(& docker images --all --quiet --filter 'dangling=true') | Foreach-Object { | |
& docker rmi $_ | out-null | |
} | |
(& docker ps --quiet --filter 'status=exited' ) | Foreach-Object { | |
& docker rm $_ | out-null | |
} |
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using Serilog; | |
using Serilog.Configuration; | |
using Serilog.Core; | |
using Serilog.Events; | |
namespace ConsoleApp24 |
public static class StringExtensions { | |
private delegate bool TryParseDelegate<T>(string s, out T result); | |
private static T To<T>(string value, TryParseDelegate<T> parse) | |
=> parse(value, out T result) ? result : default; | |
public static int ToInt32(this string value) | |
=> To<int>(value, int.TryParse); | |
public static DateTime ToDateTime(this string value) | |
=> To<DateTime>(value, DateTime.TryParse); | |
public static IPAddress ToIPAddress(this string value) | |
=> To<IPAddress>(value, IPAddress.TryParse); |
. { Invoke-WebRequest -UseBasicParsing http://boxstarter.org/bootstrapper.ps1 } | Invoke-Expression | |
Get-Boxstarter -Force | |
Install-BoxstarterPackage ` | |
-PackageName https://gist.githubusercontent.com/mivano/2b078f267d3ca1e9996c07085eb59a60/raw/Windows10-Setup.ps1 ` | |
-Credential (Get-Credential -Message "Please provide login credentials for Boxstarter reboots") |
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>xUnit Fact</Title> | |
<Shortcut>fact</Shortcut> | |
<Description>Code snippet for an xUnit test method (Fact) following the naming convention UnitOfWork_StateUnderTest_ExpectedBehaviour.</Description> |
# setup certificate properties including the commonName (DNSName) property for Chrome 58+ | |
$certificate = New-SelfSignedCertificate ` | |
-Subject localhost ` | |
-DnsName localhost ` | |
-KeyAlgorithm RSA ` | |
-KeyLength 2048 ` | |
-NotBefore (Get-Date) ` | |
-NotAfter (Get-Date).AddYears(2) ` | |
-CertStoreLocation "cert:CurrentUser\My" ` | |
-FriendlyName "Localhost Certificate for .NET Core" ` |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit" |
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot | |
# Basic setup | |
Update-ExecutionPolicy Unrestricted | |
if (Test-PendingReboot) { Invoke-Reboot } |