Skip to content

Instantly share code, notes, and snippets.

@DanDiplo
DanDiplo / JS-LINQ.js
Last active August 10, 2025 14:59
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@carcinocron
carcinocron / debugger pause beforeunload
Last active July 22, 2025 08:53
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@evantoli
evantoli / GitConfigHttpProxy.md
Last active August 12, 2025 15:29
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@bjorn-ali-goransson
bjorn-ali-goransson / HttpUtility.cs
Created July 3, 2016 14:24
Standalone HttpUtility for using ParseQueryString without dependency on System.Web
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@davidfowl
davidfowl / .NET6Migration.md
Last active April 11, 2025 11:12
.NET 6 ASP.NET Core Migration