Skip to content

Instantly share code, notes, and snippets.

@maesoser
maesoser / cf-azure-list-updater.js
Created July 1, 2025 09:01
Cloudflare Workers script that fetches Microsoft Azure Service Tags JSON, extracts IP addresses for a specified service (like ApplicationInsightsAvailability), and automatically updates a Cloudflare IP list via API.
// Cloudflare Workers script to update IP lists from Microsoft Service Tags
// Configure these environment variables in your worker:
// - CLOUDFLARE_API_KEY: Your Cloudflare API key
// - CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
// - CLOUDFLARE_LIST_ID: The ID of the list to update
// - SERVICE_NAME: The service name to filter (e.g., "ApplicationInsightsAvailability")
const MICROSOFT_SERVICE_TAGS_URL = 'https://download.microsoft.com/download/7/1/d/71d86715-5596-4529-9b13-da13a5de5b63/ServiceTags_Public_20250616.json';
export default {
@Philo
Philo / ISmtpMailDeliverySettings.cs
Last active October 18, 2022 17:22
Using .net 4.7.1 configuration builders to configuration SmtpClient from AppSettings - https://github.com/aspnet/MicrosoftConfigurationBuilders
public interface ISmtpMailDeliverySettings
{
string Host { get; }
int Port { get; }
string Username { get; }
string Password { get; }
bool EnableSSL { get; }
}
@tpeczek
tpeczek / CloudFlareConnectingIpExtensions.cs
Last active August 5, 2024 21:22
ASP.NET Core middleware for CloudFlare Connecting IP support
using System;
using Microsoft.Extensions.Options;
using Microsoft.AspNetCore.HttpOverrides;
using Lib.AspNetCore.CloudFlareConnectingIp;
namespace Microsoft.AspNetCore.Builder
{
public static class CloudFlareConnectingIpExtensions
{
public static IApplicationBuilder UseCloudFlareConnectingIp(this IApplicationBuilder app)
@davidfowl
davidfowl / dotnetlayout.md
Last active May 8, 2026 07:25
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@warrenbuckley
warrenbuckley / package-manifest.json
Last active November 8, 2016 19:46
JSON Schema for Umbraco Property Editor Package Manifest
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "propertyEditors",
"description": "An array of Umbraco Property Editors",
"type": "object",
"properties": {
"name": {
"description": "The friendly name of the property editor, shown in the Umbraco backoffice",
"type": "string"
},