This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
namespace ProcessTracking; | |
// From https://stackoverflow.com/a/37034966/1528847 | |
class ProcessTracker(bool closeOnExit = true) | |
{ | |
ChildProcessTracker? current = closeOnExit ? new() : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Server.Kestrel.Https; | |
using System.Diagnostics; | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
using Yarp.ReverseProxy.Forwarder; | |
var demo = new | |
{ | |
port = 5005, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
border-radius: 0 !important; | |
/* youtube */ | |
--yt-spec-base-background: black; | |
/* twitch */ | |
--color-background-body: black; | |
--color-background-base: black; | |
--color-background-alt: black; | |
--border-radius-small: 0; | |
--border-radius-medium: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /F "tokens=*" %G IN ('dir /b *.mkv') DO ffmpeg -i "%G" -c copy -color_range 1 -colorspace 5 -color_primaries 5 -color_trc 6 "%~nG.fixed.mkv" -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<Domain>files.conesoft.net</Domain> | |
<Hosting>D:\Hosting\Deployment\Websites</Hosting> | |
<WebPublishMethod>FileSystem</WebPublishMethod> | |
<PublishUrl>bin\Release\net8.0\publish\</PublishUrl> | |
</PropertyGroup> | |
<Target Name="ZipPublishOutput" AfterTargets="FileSystemPublish"> | |
<ZipDirectory Overwrite="true" SourceDirectory="$(publishUrl)" DestinationFile="$(Hosting)\$(Domain).zip" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<ul> | |
<li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static public class ByteHelpers | |
{ | |
static public Stream WriteBytes(this Stream stream, params byte[] bytes) | |
{ | |
stream.Write(bytes); | |
return stream; | |
} | |
static public Stream Write_8(this Stream stream, params byte[] bytes) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta name="robots" content="noindex"> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="manifest" href="/site.webmanifest"> | |
<meta name="viewport" content="width=device-width"> | |
<link href="site.css" rel="stylesheet" /> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
var monthnames = new [] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; | |
var years = new [] { 2007, 2008, 2009, 2010 }; | |
var months = Enumerable.Range(1, 12); | |
Directory.CreateDirectory("navigation-segments"); | |
foreach(var year in years) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Microsoft.AspNetCore.Components.Forms | |
<AuthorizeView> | |
<Authorized> | |
<form method="post" enctype="multipart/form-data" action="/user/update-profile-picture"> | |
@{ | |
var user = context.User?.Identity?.Name ?? "--noname--"; | |
var profilePicture = $"/user/{user}.jpg?{Random.Shared.Next()}"; | |
} | |
<label> |
NewerOlder