Skip to content

Instantly share code, notes, and snippets.

View diev's full-sized avatar

Dmitrii Evdokimov diev

View GitHub Profile
@diev
diev / CryptoPro.md
Created July 18, 2024 17:12 — forked from Barolina/CryptoPro.md
Linux cryptopro5 подпись файлов и установка

Чуть-чуть об установке

  1. что б каждый раз не вводить полный путь до команд крипто
export PATH="$(/bin/ls -d /opt/cprocsp/{s,}bin/*|tr '\n' ':')$PATH"
  1. так как, выше описная команда измениет переменную PATH тольк на время сесии, это можно исправить так: меняем PATH

  2. если во время установки, к примеру от пользователя www-data, произошла ошибка во время установке pfx, убедитесь, что

@diev
diev / CredentialManager.cs
Created March 20, 2024 19:47
Windows Credential Manager on C#
#region License
/*
Copyright 2024 Dmitrii Evdokimov
Open source software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@diev
diev / CredentialManager.ps1
Created March 20, 2024 19:30
Windows Credential Manager on PowerShell
<#
Dmitrii Evdokimov
#>
$Source = @"
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
@diev
diev / CredentialManager.cs
Created March 12, 2024 02:35 — forked from meziantou/CredentialManager.cs
Using the Windows Credential API (CredRead, CredWrite, CredDelete, CredEnumerate).
// The most up to date version is available
// on GitHub: https://github.com/meziantou/Meziantou.Framework/tree/master/src/Meziantou.Framework.Win32.CredentialManager
// NuGet package: https://www.nuget.org/packages/Meziantou.Framework.Win32.CredentialManager/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32.SafeHandles;
@diev
diev / appsettings.json
Created September 28, 2023 08:32 — forked from yetanotherchris/appsettings.json
.NET Core Examples: configuration binding and appsetting.json
{
"Smtp": {
"Host": "smtp.gmail.com",
"Port": 587,
"UseSSL": true,
"Username": "bob",
"Password": "password",
}
}
@diev
diev / make-nuget-with-tag-version.yml
Created March 29, 2023 21:54 — forked from deitry/make-nuget-with-tag-version.yml
Simple GitHub action to build NuGet package on tags push
name: Build NuGet package and push to GitHub registry
on:
workflow_call:
inputs:
organizationName:
required: true
type: string
nuspecPath:
required: true
@diev
diev / make-nuget.yml
Created March 29, 2023 21:53 — forked from deitry/make-nuget.yml
Simple GitHub action to build NuGet package
name: Build NuGet package and push to GitHub registry
on:
workflow_call:
inputs:
organizationName:
required: true
type: string
nuspecPath:
required: true
@diev
diev / Xerox Phaser 3140 macOS Catalina driver update
Created March 11, 2022 00:53 — forked from santiago26/Xerox Phaser 3140 macOS Catalina driver update
How to get worked old Xerox printer in macOS Catalina
# Intro
Xerox said that Phaser 3140 hass "level 2" of support which means that Xerox not planning to update it's driver any way.
macOS no longer supports 32bit apps since macOS Catalina, and Xerox drivers installer provided at xerox.com is 32bit-app. But drivers will still work if we can install it. So we just need to install drivers itself manually.
To make it old printers work you just need to copy few files from installer to their designed locations.
# Download
You can download unpacked files from macOS 10.14 (10.11+) or unpack from official site by yourselve.
https://yadi.sk/d/K4Z-FlHFTyT2BQ?w=1
#Installation
@diev
diev / load_data_from_xlsx.py
Created October 19, 2021 13:42
Load data from XLSX (using Python)
from openpyxl import load_workbook
import sys
import re
filename = 'registry_20210208.xlsx'
wb = load_workbook('data/' + filename)
ws = wb.active
start_row = 4
end_row = ws.max_row - 1
@diev
diev / set_RW.cmd
Created October 4, 2021 10:26
Выдача права (чтение=0 или запись=1) на каталог в глубине дерева файловой шары, так чтобы по пути к нему были видны только каталоги пути, без иного содержимого. Запустить из требуемого каталога - скрипт установит все права по пути до корня шары..
@echo off
rem cmd username|groupname 1|0
if /%1/==// goto :eof
if /%2/==/1/ goto ok
if /%2/==/0/ goto ok
goto :eof
:ok
set user=%1
set RW=%2