Skip to content

Instantly share code, notes, and snippets.

@alexeygritsenko
alexeygritsenko / PipeServer.cs
Created August 15, 2023 16:28
temporary fixes for PipeServer.cs
using System.IO.Pipes;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using H.Formatters;
using H.Pipes.Args;
using H.Pipes.Factories;
using H.Pipes.IO;
using H.Pipes.Utilities;
@alexeygritsenko
alexeygritsenko / translit.js
Created April 5, 2023 12:06
Translit Cyrillic to Seo URL
function toSeoUrl(string, lang = 'en') {
var delimiter = '-',
keyword = '',
abc = {
'ß': 'ss',
'à': 'a',
'á': 'a',
'â': 'a',
'ã': 'a',
'ä': 'a',
@alexeygritsenko
alexeygritsenko / ecdsa-gen.sh
Created April 3, 2023 08:40
Generate of a self-signed certificate for .net grpc
#!/bin/bash
# sha256ECDSA + HTTP/2 supported Windows Server 2012+
# see https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1#http2-support
echo Generate CA key:
openssl ecparam -name prime256v1 -genkey -out ca.key
echo Generate CA certificate:
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -subj "/C=US/ST=CA/L=Cupertino/O=YourCompany/OU=YourApp/CN=MyRootCA"
format PE64 GUI 5.0
entry WinMain
include 'includes\win64a.inc'
section '.text' code readable writeable executable
_title TCHAR 'Iczelion Tutorial #3:The Simplest Window in FASM',0 ;name of our window
wc WNDCLASSEX sizeof.WNDCLASSEX,0,WindowProc,0,0,400000h,0,10003h,COLOR_WINDOW,NULL,_title,NULL
proc WinMain
local msg:MSG
@alexeygritsenko
alexeygritsenko / HttpClientHelper.cs
Created October 5, 2021 18:05
Solution for Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Text;
namespace MyXamarinNativeApp.Shared.Helpers
{
public class HttpClientHelper
{
include includes\win64a.inc
.code
WinMain proc
local msg:MSG
xor ebx,ebx ;rbx = 0
mov esi,IMAGE_BASE ; дескриптор нашей программы
mov eax,10027h ; дескриптор иконки
mov edi,offset ClassName; Имя нашего класса окна
; заполнение структуры wc и регистрация класса
push rax ;hIconSm дескриптор малой иконки