Skip to content

Instantly share code, notes, and snippets.

View jeffward01's full-sized avatar

Jeff Ward jeffward01

  • Universal Music Group
  • The Death Star
View GitHub Profile
using Foundatio.Queues;
using System.Collections.Concurrent;
using Microsoft.Extensions.DependencyInjection;
namespace Contacts.Domain.Services;
public interface INamedRegistrationFactory<T> where T : class {
/// <summary>
/// Get instance by name
/// </summary>
@manishtiwari25
manishtiwari25 / world_currency_symbols.json
Last active November 1, 2025 00:38
List Of Countries With States And Other Useful Information, Updated On 11/01/2025 00:38:26
[
{
"Flag": "https://www.geonames.org/flags/x/ad.gif",
"CountryName": "Andorra",
"Currency": "Euro Member Countries",
"Code": "EUR",
"Symbol": "\u20AC",
"SymbolImage": "https://www.xe.com/symbols-page/symbols/curSymbol8364.gif"
},
{
@mkober
mkober / windows-symlinks.md
Last active February 11, 2024 16:42
Creating Symbolic Links on Windows
From: http://www.labnol.org/software/wget-command-examples/28750/
How do I download an entire website for offline viewing? How do I save all the MP3s from a website to a folder on my computer? How do I download files that are behind a login page? How do I build a mini-version of Google?
Wget is a free utility – available for Mac, Windows and Linux (included) – that can help you accomplish all this and more. What makes it different from most download managers is that wget can follow the HTML links on a web page and recursively download the files. It is the same tool that a soldier had used to download thousands of secret documents from the US army’s Intranet that were later published on the Wikileaks website.
You mirror an entire website with wget
Mirror an entire website with wget
Spider Websites with Wget – 20 Practical Examples
@Delaire
Delaire / CoreTools.cs
Last active June 17, 2025 08:49
UWP, C# - Retrieve the redirect url using HttpClient from the Headers of the Response - [HttpClient,C#]
public static class CoreTools
{
public static async Task<string> GetRedirectedUrl(string url)
{
//this allows you to set the settings so that we can get the redirect url
var handler = new HttpClientHandler()
{
AllowAutoRedirect = false
};
string redirectedUrl = null;
@mdschweda
mdschweda / Folder structure
Last active April 3, 2023 16:28
Multiple projects DocFX structure
+-- doc
⁞ +-- api
⁞ ⁞ +-- ProjectA
⁞ ⁞ ⁞ +-- index.md
⁞ ⁞ +-- ProjectB
⁞ ⁞ +-- index.md
⁞ +-- docfx.json
⁞ +-- toc.yml
+-- src
+-- ProjectA
@Aldaviva
Aldaviva / Video encoding with FFmpeg.md
Last active May 24, 2023 01:46
Video encoding with FFmpeg, a great tool with the shittiest user interface you can imagine: lots of confusing, unmemorable, unintuitive, undiscoverable command-line flags

Remux without transcoding

ffmpeg -i input.ts -c copy output.mp4

x264, AAC

ffmpeg -i input.avi -c:v libx264 -preset slow -crf 23 -pix_fmt yuvj420p -c:a aac -b:a 160k output.mp4
@AlexMAS
AlexMAS / ProcessAsyncHelper.cs
Last active August 30, 2025 20:40
The right way to run external process in .NET (async version)
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();
@azborgonovo
azborgonovo / UnitOfWork.cs
Last active April 20, 2024 13:54
Creating the 'best' Unit of Work and Repository implementation on C#
// Basic unitOfWork pattern as described by Martin Fowler (http://martinfowler.com/eaaCatalog/unitOfWork.html)
// Other methos as 'registerNew' are going to be managed by each repository
public interface IUnitOfWork : IDisposable
{
void Commit();
Task CommitAsync();
void Rollback();
}
public interface IUnitOfWorkFactory
@shmup
shmup / torrents.md
Last active October 29, 2025 02:51
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client: