Skip to content

Instantly share code, notes, and snippets.

View sturlath's full-sized avatar

Sturla Thorvaldsson sturlath

View GitHub Profile
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Npgsql;
namespace DockerPSQLGitHubActionDebug
{
class Program
{
static async Task Main(string[] args)
{
@sturlath
sturlath / docker-build-deploy.yml
Last active July 3, 2023 08:03
A abp.io Blazor Server docker build and deploy to dev and production to Azure Container Apps
name: Version, Build, and Deploy
on:
push:
branches:
- main
tags:
- 'v*' # This will match tags like v1.0, v2.0.1, etc. and is used to deploy to production
pull_request:
branches:
2022-07-09 17:57:26.242 +00:00 [INF] Executing endpoint '/Documents/Project/Index'
2022-07-09 17:57:26.245 +00:00 [INF] Route matched with {page = "/Documents/Project/Index", controller = "", area = "", action = ""}. Executing page /Documents/Project/Index
2022-07-09 17:57:26.247 +00:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2022-07-09 17:57:26.249 +00:00 [INF] Executing handler method Volo.Docs.Pages.Documents.Project.IndexModel.OnGetAsync - ModelState is "Valid"
2022-07-09 17:57:26.251 +00:00 [INF] AUDIT LOG: [200: GET ] /en/docs/latest
- UserName - UserId : admin - a3da67aa-6b62-a40f-dda6-3a049f423732
- ClientIpAddress : 85.220.108.182
- ExecutionDuration : 0
- Actions:
- Volo.Docs.Documents.DocumentAppService.FullSearchEnabledAsync (0 ms.)
{
"id": "c27a2660-457c-419a-915b-551fb94522b4",
"name": "My Visual Studio extensions",
"description": "A collection of my Visual Studio extensions",
"version": "1.0",
"extensions": [
{
"name": "Add New File",
"vsixId": "2E78AA18-E864-4FBB-B8C8-6186FC865DB3"
},
Visual Studio About
Microsoft Visual Studio Community 2017 Preview
Version 15.7.0 Preview 2.0
VisualStudio.15.Preview/15.7.0-pre.2.0+27520.0
Microsoft .NET Framework
Version 4.7.02558
Installed Version: Community
@sturlath
sturlath / gist:b695da5222f87beb2b0834eca92c8ac7
Created January 25, 2017 11:16
Get values from resx files
/// <summary>
/// Just a simple wraper for getting values from resx file with just basic error handling
/// </summary>
/// <example>
/// Usage is just like = ErrorStrings.Current.NotAValidEmail;
/// </example>
public class ErrorStrings
{
public string NotAValidEmail
@sturlath
sturlath / SecureStringencryption.cs
Last active January 10, 2017 14:38
Encrypting SecureString to regular string
/// <summary>
/// Encrypts a SecureString to a regular string.
/// </summary>
/// <remarks>This is a draft that Im hoping to get comments on in http://stackoverflow.com/a/26202992/1187583</remarks>
public static string EncryptSecureStringToRegularString(this SecureString secureString)
{
var pointer = IntPtr.Zero;
try
{
@sturlath
sturlath / BoxtarterGist
Last active March 21, 2016 06:34
My developer machine gist to use with Boxstarter and Chockolatey
#Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
#Enable-RemoteDesktop
choco install lastpass
cinst dropbox
cinst cmdermini.portable
cinst PowerShellGAC
cinst swish
cinst DRKSpider
cinst Slickrun