- Makefile
- Dockerfile
- Github Actions
- Goreleaser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func FirstFrame(path string, data []byte) (*bufio.Reader, error) { | |
cmd := exec.Command(path, | |
"-i", "-", // read from stdin | |
"-vframes", fmt.Sprint(1), // frame | |
"-s", fmt.Sprintf("%dx%d", 640, 360), // size | |
"-q:v", fmt.Sprint(2), // quality | |
"-f", "singlejpeg", // jpeg binary | |
"-", // read from stdout | |
) | |
// stdin read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomeClass { | |
public void SomeMethod() { | |
this.Log().Info(() => "Here is a log message with params which can be in Razor Views as well: '{0}'".FormatWith(typeof(SomeClass).Name)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BinaryModelSerialaizer | |
{ | |
BinaryFormatter _binaryFormatter; | |
public BinaryModelSerialaizer(BinaryFormatter binaryFormatter) | |
{ | |
_binaryFormatter = binaryFormatter; | |
} | |
public byte[] Serialize<T>(T obj) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bis="http://Test/B.Info"> | |
<soapenv:Header> | |
<ActivityId xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-201908271035</ActivityId> | |
</soapenv:Header> | |
<soapenv:Body> | |
<bis:TryGetInfo> | |
<bis:hash> | |
<string>447F76CBD3B5AE0FABFDCF065B5BFC461C9E7E42</string> | |
</bis:hash> | |
</bis:TryGetInfo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TOP 10 substring(t.TEXT, qs.statement_start_offset / 2, CASE | |
WHEN qs.statement_end_offset = - 1 | |
THEN len(t.TEXT) | |
ELSE (qs.statement_end_offset - qs.statement_start_offset) / 2 | |
END) | |
,qs.execution_count | |
,cast(qs.total_worker_time / 1000 AS DECIMAL(18, 2)) AS total_worker_time_ms | |
,cast(qs.total_worker_time * 1. / qs.execution_count / 1000. AS DECIMAL(18, 2)) AS avg_worker_time_ms | |
,cast(p.query_plan AS XML) AS query_plan | |
FROM sys.dm_exec_query_stats qs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocount on | |
declare @name varchar(128), @substr nvarchar(4000), @column varchar(128) | |
set @substr = '%%' --фрагмент строки, который будем искать | |
create table #rslt | |
(table_name varchar(128), field_name varchar(128), value ntext) | |
declare s cursor for select table_name as table_name from information_schema.tables where table_type = 'BASE TABLE' order by table_name | |
open s | |
fetch next from s into @name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config | |
Description: The setting calculate using this article https://docs.microsoft.com/en-us/previous-versions/msp-n-p/ff647813(v=pandp.10) | |
The values set out of youre hardware. | |
Example for hardware: CPU 4 Core, RAM 8 Gb | |
--> | |
<system.web> | |
<!--<processModel autoConfig="true" />--> | |
<processModel autoConfig="False" maxWorkerThreads="1000" maxIoThreads="1000" minWorkerThreads="1000" minIoThreads="1000" /> | |
<httpRuntime appRequestQueueLimit="50000" minFreeThreads="999" minLocalRequestFreeThreads="999"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"RouteInfo": { | |
"InstanceId": "GUID", | |
"ParentInstanceId": "GUID", | |
"RouteType": "String", | |
"RouteCode": "String" | |
}, | |
"Correlation": [ // Какието ID запесей в очереди базы, которые нужно ожидать пока они исполнятся | |
{ | |
"Id": "1", |