Skip to content

Instantly share code, notes, and snippets.

View sgedda's full-sized avatar

Sebastian Gedda sgedda

  • SGedda IT
  • Sverige
View GitHub Profile
{
"cellConfigs": [
{ "cellId": "12345", "pci": "ABCDE" },
{ "cellId": "67890", "pci": "FGHIJ" },
{ "cellId": "47108", "pci": "0" }
],
"sendoutDelayMs": 600000
}
@sgedda
sgedda / c_sharp_history
Created August 12, 2021 08:30
C# History
| Version | .NET Framework | Visual Studio | Important Features |
| ------- | ----------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| C# 1.0 | .NET Framework 1.0/1.1 | Visual Studio .NET 2002 | Basic features |
| C# 2.0 | .NET Framework 2.0 | Visual Studio 2005 | Generics<br/>Partial types<br/>Anonymous methods<br/>It
@sgedda
sgedda / CustomAuthenticationStateProvider.cs
Last active March 29, 2021 09:19
CustomAuthenticationStateProvider.cs
public class CustomAuthenticationStateProvider : AuthenticationStateProvider
{
private ISessionStorageService _sessionStorageService;
public MagiroAuthenticationStateProvider(ISessionStorageService sessionStorageService)
{
_sessionStorageService = sessionStorageService;
}
public override async Task<AuthenticationState> GetAuthenticationStateAsync()
@sgedda
sgedda / init.sh
Last active February 21, 2021 12:57
put it in your .net core root folder, will be used as entrypoint for Dockerfile
# Filename init.sh used as entrypoint, put it in your .net core root # folder
mkdir -p $HOME/.pki/nssdb
certutil -d sql:$HOME/.pki/nssdb -N --empty-password
pk12util -i Cert/empty-certificate.p12 -d sql:$HOME/.pki/nssdb -W 'YOURPASSWORD'
Xvfb :99 -screen 0 640x480x8 -nolisten tcp &
dotnet Selenium.Docker.Certificate.dll
@sgedda
sgedda / ChromeDriverWrapper.cs
Last active February 21, 2021 12:53
ASP.NET Core 5.0 Docker, Selenium Headful, Import and allow Client Certificate in Linux container
public class ChromeDriverWrapper
{
public ChromeDriverWrapper()
{
var options = new ChromeOptions();
//options.AddArgument("--headless");
options.AddArgument("--disable-extensions");
options.AddArgument("--disable-gpu");
options.AddArgument("--no-sandbox");