Skip to content

Instantly share code, notes, and snippets.

'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.11\System.Security.Cryptography.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.11\System.Runtime.Serialization.Formatters.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
warn: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to bind to http://localhost:5000 on the IPv4 loopback interface: 'The requested service provider could not be loaded or initialized'.
Microsoft.AspNetCore.Server.Kestrel:Warning: Unable to bind to http://localhost:5000 on the IPv4 loopback interface: 'The requested service provider could not be loaded or initialized'.
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message","time":"2019-06-24T01:56:47.0208730Z","tags":{"ai.application
#!/bin/sh
# Script to backup the SD card of a Pi to the nas.
backupLocation="/dev/athena/backup/openhabpi/"
backupName="$(date +%Y%m%d%H%S).img"
sudo dd if=/dev/mmcblk0 | sudo gzip > $backupLocation$backupName.gz
result=$?
body {
padding-top: 50px;
padding-bottom: 20px;
}
/* Set padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
namespace JelleBens.Common.Security
{
public class MyPrincipal : ClaimsPrincipal
$.ajaxSetup({cache: false}});
$.ajax({
url: '@Url.Action("Tasks", "Inbox", new { area = string.Empty })',
data: { userId : '@MyPrincipal.Current.Id' },
cache: false,
type: "GET",
success: function (data) {
$("#numberOfTaskListItems").html(data);
},
dataType: "json"
});
<system.webServer>
<staticContent>
<remove fileExtension=".woff"/>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>
</system.webServer>
public class MyAuthenticationManager : ClaimsAuthenticationManager
{
private readonly IWindsorContainer _container;
private readonly ILogger _logger;
public MyAuthenticationManager(IWindsorContainer container)
{
_container = container;
_logger = _container.Resolve<ILoggerFactory>().Create(Loggers.Security);
}