Skip to content

Instantly share code, notes, and snippets.

View STmihan's full-sized avatar

Mikhail Dunaev STmihan

View GitHub Profile
@STmihan
STmihan / Main.kt
Created November 8, 2023 20:37
generate and read RSA
import java.io.File
import java.security.KeyFactory
import java.security.KeyPair
import java.security.KeyPairGenerator
import java.security.spec.PKCS8EncodedKeySpec
import java.security.spec.X509EncodedKeySpec
import java.util.*
fun main(args: Array<String>) {
val keypair = keygen("key")
{
"FileAccessManager": {
"TcpEndPoints": [ "0.0.0.0:993", "[::]:993" ],
"UdpEndPoints": [ "0.0.0.0:993", "[::]:993" ],
"SslCertificatesPassword": null
},
"IsDiagnoseMode": false
}
@STmihan
STmihan / SpringConfig.java
Last active November 8, 2021 18:43
Thymeleaf Spring MVC Configs
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.thymeleaf.spring5.SpringTemplateEngine;
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
@STmihan
STmihan / lab2.cpp
Created October 11, 2021 01:15
lab2(AiP)
#include <iostream>
#include <string>
using namespace std;
class Milk
{
private:
string _name;
double _fatPercent;
@STmihan
STmihan / lab1.cpp
Last active October 11, 2021 00:44
lab1 (AiP)
#include <iostream>
#include <string>
using namespace std;
class Milk
{
private:
string _name;
double _fatPercent;
@STmihan
STmihan / EasingFunctions.cs
Created July 11, 2021 21:50 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights