Skip to content

Instantly share code, notes, and snippets.

View DmitriyVlasov's full-sized avatar

Dima Vlasov DmitriyVlasov

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@swlaschin
swlaschin / effective-fsharp.md
Last active March 8, 2024 03:10
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges

///*
let func =
(ParChTable as table,
ChildKey as text,
ParentKey as text,
LevelColumnName as text) =>
//*/
let
@pimbrouwers
pimbrouwers / mssql-calendar-table.sql
Last active October 12, 2023 13:20
SQL Server Calendar Table
USE master
GO
IF OBJECT_ID('dbo.calendar') IS NOT NULL
DROP TABLE dbo.calendar;
IF OBJECT_ID('dbo.fn_generate_calendar') IS NOT NULL
DROP FUNCTION dbo.fn_generate_calendar;
GO
@maxim-uvarov
maxim-uvarov / killerDateTableRu.pq
Last active December 2, 2018 11:19
функция в Power Query (язык M) создает таблицу с датами. Дополняет ее различными столбцами, включая данные о государственных выходных дня в РФ. https://github.com/power-bi/KillerDateTableRu
Проект переехал в репозиторий https://github.com/power-bi/KillerDateTableRu
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2024 11:49
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

#r @"packages\Streams.0.2.5\lib\Streams.Core.dll"
open System
open System.IO
open System.Collections.Generic
open Nessos.Streams
// make Visual Studio use the script directory
Directory.SetCurrentDirectory(__SOURCE_DIRECTORY__)
@dsyme
dsyme / Eto sample script
Created October 18, 2014 11:35
Sample of using the Eto cross-platform GUI framework (https://github.com/picoe/Eto/) with F# (on windows)
#r @"packages\Eto.Forms.1.3.0\lib\net40\Eto.dll"
#r @"packages\Eto.Platform.Windows.1.3.0\lib\net40\Eto.Platform.Windows.dll"
open System
open Eto.Forms
open Eto.Drawing
@forki
forki / gist:08d36d1e79603ef12c25
Last active November 17, 2015 10:26
Get Paket download counts
//------------------------------------------
// Step 0. Boilerplate to get the paket.exe tool
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
if not (File.Exists "paket.exe") then
let url = "http://fsprojects.github.io/Paket/stable"
@mndrake
mndrake / DeedleFormatter.fsx
Created April 23, 2014 17:03
Deedle Series and IFrame formatter for IFSharp
#I "../lib"
#r "FSharp.Markdown.dll"
#r "FSharp.Literate.dll"
#r "Deedle.dll"
open System.IO
open Deedle
open Deedle.Internal
open FSharp.Literate
open FSharp.Markdown