Skip to content

Instantly share code, notes, and snippets.

View kfrancis's full-sized avatar
😀
Happy to help!

Kori Francis kfrancis

😀
Happy to help!
  • Clinical Support Systems
  • Kingston, Ontario
  • X @djbyter
View GitHub Profile
@kfrancis
kfrancis / LimitArrayPoolWriteStream.cs
Created April 3, 2024 01:33
Version of LimitArrayPoolWriteStream compat with netstandard2.0
internal sealed class LimitArrayPoolWriteStream : Stream
{
private const int InitialLength = 256;
private readonly int _maxBufferSize;
private byte[] _buffer;
private int _length;
public LimitArrayPoolWriteStream(int maxBufferSize) : this(maxBufferSize, InitialLength) { }
@kfrancis
kfrancis / LoopbackHttpListener.cs
Created November 23, 2021 18:00
LoopbackHttpListener from Identity with some changes that make it work up to net6.0
/// <summary>
/// The HTTP Loopback Listener used to receive commands via HTTP.
/// </summary>
internal class LoopbackHttpListener : IDisposable
{
/// <summary>
/// The <see cref="TaskCompletionSource{TResult}"/>.
/// </summary>
private readonly TaskCompletionSource<string> _completionSource = new TaskCompletionSource<string>();
@kfrancis
kfrancis / start.gcode
Created May 11, 2021 16:08
Cura start g-code for Anycubic Predator (v2.0.8.0+ where UBL is activated)
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 ;Home
G1 Z15.0 F1000;short move
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock adjust so I don't have to remove any filament
G92 E0 ;zero the extruded length again
G1 F4000 ;move to bed
@kfrancis
kfrancis / article.md
Last active March 17, 2021 16:31
How to Integrate the Telerik UI for ASP.NET Core (Kendo) components with the ABP MVC UI

How to Integrate the Telerik UI for ASP.NET Core (Kendo) components with the ABP MVC UI?

Introduction

Hi, in this step by step article, we will see how we can integrate the Telerik UI for ASP.NET Core (Kendo) components with our Abp MVC app.

Creating the Solution

ABP Framework offers startup templates to get into business faster.

@kfrancis
kfrancis / Win10Daily_BoxSetup.txt
Last active March 8, 2021 22:30 — forked from cygnull/Win10Daily_BoxSetup.txt
Boxstarter script for Windows 10 Daily use, Gaming, Developement..
#As described here: http://boxstarter.org/Learn/WebLauncher
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/kfrancis/c6351a39b60b4d6c357679a57f626710/raw/9ff85d80e76685203b66e81b2c6c746f485bbfdd/Win10Daily_BoxSetup.txt
Write-BoxstarterMessage "Setting Execution Policy to Unrestricted and Disabling UAC"
Update-ExecutionPolicy Unrestricted
Disable-UAC
Restart-Computer
@kfrancis
kfrancis / print_complete.gcode
Created March 17, 2020 21:11
OctoPrint AnyCubic Predator Print Complete
M140 S0
M82 ;absolute extrusion mode
M107
M104 S0
M140 S0
;Retract the filament
G92 E1
G1 E-1 F300
G28
M84
@kfrancis
kfrancis / bootstrapwindows10.ps1
Last active January 3, 2020 17:14 — forked from zloeber/bootstrapwindows10.ps1
Boxstarter Windows 10 Configuration
<#
The command to run, built from the raw link of this gist
Win+R
iexplore http://boxstarter.org/package/url?<RAW GIST LINK>
OR (if you don't like the way the web launcher force re-installs everything)
@kfrancis
kfrancis / temp.ino
Created December 5, 2019 18:28
Working with the toggles
#include "SparkFun_Qwiic_Button.h"
QwiicButton toggle;
uint8_t brightness = 100;
void setup() {
Serial.begin(115200);
Serial.println("Qwiic toggle examples");
Wire.begin(); //Join I2C bus
@kfrancis
kfrancis / web.config
Created November 12, 2019 16:30
Intercom Reverse IIS Proxy for Let's Encrypt SSL
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
</staticContent>
<rewrite>
<rules>
<!-- Make all requests https -->
<rule name="Https redirect" stopProcessing="true">
#>> from https://github.com/microsoft/windows-dev-box-setup-scripts/blob/master/scripts/FileExplorerSettings.ps1
#--- Configuring Windows properties ---
#--- Windows Features ---
# Show hidden files, Show protected OS files, Show file extensions
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
#--- File Explorer Settings ---
# will expand explorer to the actual folder you're in
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
#adds things back in your left pane like recycle bin