Skip to content

Instantly share code, notes, and snippets.

View xperiandri's full-sized avatar

Andrii Chebukin xperiandri

View GitHub Profile
@Zerg00s
Zerg00s / Cognitive Search API - SharePoint Data Source.json
Last active March 27, 2024 21:15
Cognitive Search API - SharePoint Data Source - Reusable Postman collection
{
"info": {
"_postman_id": "7f9a258e-feee-40a7-827f-760caa441e43",
"name": "Cognitive Search API Reusable",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "641744"
},
"item": [
{
"name": "Create SharePoint Data Source",
@CaptnCodr
CaptnCodr / Fli.md
Last active January 31, 2024 13:46
A little story about Fli

A little story about Fli

This is my first contribution to the FsAdvent on Sergey Tihon's Blog, thank you Sergey for making this possible every year.

Back in September 2022, a wonderful idea came to my mind. I kept thinking more and more over it and took a note, here is the original gist:

type Shell =
| BASH
| POWERSHELL
| CMD
@danslapman
danslapman / GenericExtensions.cs
Last active June 19, 2023 06:45
Basic F# support for Swashbuckle
public static class GenericExtensions
{
public static void CopyProperties<T>(this T source, T destination)
{
var props = source?.GetType().GetProperties();
if (props == null) return;
foreach (var prop in props)
{
prop.SetValue(destination, prop.GetValue(source));
}
@IltaySaeedi
IltaySaeedi / TransportationProblem.fsx
Created May 6, 2021 14:08
This is my first exprience with Linear Programming, I tried to solve a transportation problem by using Flips package.
#r "nuget: Flips, 2.4.5"
open Flips
open Flips.Types
// مساله حمل و نقل
// مساله: 2 کارخانه با ظرفیت های تولید کالای معین به 3 انبار کالاهای
// خود را ارسال می کنند تا تقاضای انبارها تامین شود نه بیشتر نه کمتر
// با توجه به هزینه هایی که رفت آمد در پی دارد بیابید که
// هر کارخانه به چه مقدار و به کدام انبار اجناس خود را ارسال کند
// تا کمترین هزینه ی رفت و آمد را داشته باشیم
@alfonsogarciacaro
alfonsogarciacaro / Deploy.md
Last active March 3, 2023 09:50
Deploying an F# ASP.NET Core app (Giraffe) to Azure

Deploying an F# ASP.NET Core app to Azure

Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)

Preparation

The following steps are mostly taken from this guide and it's only necessary to do them once:

  1. Create an account in Azure (or use an existing one)
  2. Create a resource group (or use an existing one)
@primaryobjects
primaryobjects / m3u8.md
Last active June 9, 2024 09:58
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@evanwill
evanwill / gitBash_windows.md
Last active May 29, 2024 11:03
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@panesofglass
panesofglass / AsyncCallableHandler.fs
Last active April 24, 2023 17:53
How to use base.SendAsync in F# DelegatingHandler
type internal AsyncCallableHandler(messageHandler) =
inherit DelegatingHandler(messageHandler)
member internal x.CallSendAsync(request, cancellationToken) =
base.SendAsync(request, cancellationToken)
@jack-pappas
jack-pappas / _simple.fs
Last active May 10, 2023 07:09
Fixed-length arrays in F#
// Original code posted in fsharp-opensource discussion:
// https://groups.google.com/forum/#!topic/fsharp-opensource/pI73-GkoxbY
namespace Blah
open System.Runtime.InteropServices
[<Struct>]
type vec3_t =
@diego898
diego898 / rd.md
Last active October 13, 2020 21:18
Enable Concurrent Remote Desktop Users in Windows 8.1 x64

thanks to @neurodyne and this link for updated instructions

This works with the following versions of termsrv.dll

x64 - termsrv.dll - 6.3.9600.17095

Find Replace
39813C0600000F849E310500 B80001000089813806000090
090085C07F078BD8 090085C090908BD8