Skip to content

Instantly share code, notes, and snippets.

View fjod's full-sized avatar
🎯
Focusing

Michael fjod

🎯
Focusing
  • Lithuania
View GitHub Profile
using System.Data.Common;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace PostgresExtensions;
/*

Другие интересные штуки тут: https://t.me/notes_of_programmer

Текущие выполняемые запросы

select pid, user, client_addr, query_start, backend_type, substr(query, 0, 256) as query
from pg_stat_activity
where query_start is not null
  and client_addr is not null;
@davepcallan
davepcallan / stringConcatenationDotnet8.cs
Last active March 29, 2024 02:54
.NET 8 simple string concatenation benchmarks
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Reports;
using System;
using System.Text;
namespace Benchmarks
{
module AsyncResultModule
type AsyncResult<'a> = Async<Result<'a, exn>>
[<RequireQualifiedAccess>]
module AsyncResult =
// Few basic functions
let bind (f: 'a -> AsyncResult<'b>) (a: AsyncResult<'a>): AsyncResult<'b> =
@MaheKarim
MaheKarim / PluralSight Video Crack Code
Created May 20, 2019 15:58
PluralSight Video Crack Code
DecryptPluralSightVideos /F "C:\Users\Admin\AppData\Local\Pluralsight\courses" /DB "C:\Users\Admin\AppData\Local\Pluralsight\pluralsight.db" /TRANS /RM /OUT "L:\Course"
@Szer
Szer / enum-like-converter.fs
Last active August 10, 2021 05:40
Option converter for Newtonsoft.Json
[<AutoOpen>]
module EnumLikeDuConverter =
open Newtonsoft.Json
open Microsoft.FSharp.Reflection
open System.Collections.Concurrent
open Newtonsoft.Json.Linq
/// see `enumLikeDuConverter`
type EnumLikeDuConverter() =
@milmazz
milmazz / imposter-handbook-links.md
Last active April 1, 2024 10:31
Useful links found in The Imposter's Handbook by Rob Conery
@DanDiplo
DanDiplo / JS-LINQ.js
Last active June 7, 2024 00:50
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 },