Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TritusIX
TritusIX / New MS Teams Profile.cmd
Last active December 22, 2022 15:24 — forked from DanielSmon/New MS Teams Profile.cmd
For running multiple MS Teams accounts side by side. Save this with the name of the MS Teams profile you wish to use. When launched, a folder will be created in your user profile. Fixed missing "Desktop folder " See https://danielsmon.com/2020/04/02/multiple-ms-teams-accounts-on-the-desktop/.
@ECHO OFF
REM Uses the file name as the profile name
SET MSTEAMS_PROFILE=%~n0
ECHO - Using profile "%MSTEAMS_PROFILE%"
SET "OLD_USERPROFILE=%USERPROFILE%"
SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%"
REM Ensure there is a downloads folder to avoid error described at
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active June 4, 2025 13:38
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@UweKeim
UweKeim / FileSize.cs
Created October 27, 2020 07:45
Automatically formatting an integer for human-readable file size
namespace Extensions
{
using System;
using System.Globalization;
using System.Threading;
public static class FileSizeExtensions
{
public static string FormatFileSize(
this long fileSize,
@ZacharyPatten
ZacharyPatten / Omnitree.md
Last active September 29, 2022 11:25
[July 8, 2014] Blog Post discussing a generic N-D SPT data structure

Omnitree

Date: July 8, 2014

Introduction

In this article, I would like to introduce and explain a data structure I have written in C#. This structure has the ability to store items sorted along "N" dimensions. It is similar in concept to a k-d tree (see Wikipedia), but it is NOT implemented as a binary tree. It branches relative to the number of dimensions its items are being sorted upon.

I developed the structure entirely on my own accord, and since I could not find another implementation like it, I am taking the liberty in giving it a name. I have called the structure an "Omni-Tree".

Background

@UweKeim
UweKeim / BlazorTimer.cs
Last active January 28, 2024 21:30
Timer in Blazor 3.1
namespace ZetaHelpdesk.MainBlazor.Code.Components
{
using System;
using System.Timers;
// https://wellsb.com/csharp/aspnet/blazor-timer-navigate-programmatically/
public sealed class BlazorTimer
{
private Timer _timer;
namespace ZetaProducer.RuntimeGui.ExtendedWebBrowser
{
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Zeta.VoyagerLibrary.Common.IO;
@UweKeim
UweKeim / ZetaFolderXCopy.cs
Last active January 28, 2024 21:32
XCOPY-like functionality to copy files and folders in C#, ideal for batch scripts
//css_nuget -force:3600 -ng:"-Source https://nuget.org/api/v2/" ZetaLongPaths
using ZetaLongPaths;
namespace Zeta
{
/*
===========================
Zeta XCOPY.
@andyraddatz
andyraddatz / ASCIIStringExtensions.cs
Last active May 27, 2025 07:35
C# String extension method to fold diacritics to ASCII characters
// IMPORTANT
using System.Text;
// This gist was created thanks to this comment from Alexander on StackOverflow:
// https://stackoverflow.com/questions/249087/how-do-i-remove-diacritics-accents-from-a-string-in-net#comment86833005_34272324
// This is a derivative work. The logic of this function comes from a switch statement found inside the
// Lucene.Net library. The documentation of the conversion of characters is quite impressive
// (thank you @NightOwl888 and @synhershko !!!):
// https://github.com/apache/lucenenet/blob/master/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/ASCIIFoldingFilter.cs
@UweKeim
UweKeim / ColorConverting.cs
Last active October 9, 2024 14:25
HSL color, HSB color and RGB color types, as well as conversion methods between them in C# and .NET
namespace ZetaColorEditor.Colors;
using System;
using System.Drawing;
/// <summary>
/// Provides color conversion functionality.
/// </summary>
/// <remarks>
/// http://en.wikipedia.org/wiki/HSV_color_space