Skip to content

Instantly share code, notes, and snippets.

View uzbekdev1's full-sized avatar
🌴
On vacation

Elyor Latipov uzbekdev1

🌴
On vacation
View GitHub Profile
@uzbekdev1
uzbekdev1 / Decrypt.cs
Created November 3, 2021 16:20 — forked from ginxx009/Decrypt.cs
Encryption & Decryption MD5 C#
private void btnDecrypt_Click(object sender, EventArgs e)
{
byte[] data = Convert.FromBase64String(textBox4.Text); // decrypt the incrypted text
using (MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider())
{
byte[] keys = md5.ComputeHash(UTF8Encoding.UTF8.GetBytes(hash));
using (TripleDESCryptoServiceProvider tripDes = new TripleDESCryptoServiceProvider() { Key = keys, Mode = CipherMode.ECB, Padding = PaddingMode.PKCS7 })
{
ICryptoTransform transform = tripDes.CreateDecryptor();
byte[] results = transform.TransformFinalBlock(data, 0, data.Length);
@uzbekdev1
uzbekdev1 / clean_code.md
Created October 28, 2021 21:08 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@uzbekdev1
uzbekdev1 / clean_code.md
Created October 28, 2021 21:08 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@uzbekdev1
uzbekdev1 / .htaccess
Last active October 23, 2021 20:19
Font awesome issue in the htaccess file (only FX browser)
# -------------------------
# HTACCESS FILE
# -------------------------
AddDefaultCharset utf-8
Options +FollowSymLinks
# RESTRICTIONS
# Disallow direct access to this file and any log / cache file
# Prevent directory browsing
@uzbekdev1
uzbekdev1 / run.sh
Last active October 22, 2021 14:36
RabbitMQ Cluster
# Dokcer info
docker info
# create custom bridge network
docker network create mynet
docker network inspect mynet
# rabbit1 is hostname , erlang cookie is defined to facilitate cluster
#Node 1
@uzbekdev1
uzbekdev1 / startup.bat
Created October 17, 2021 20:27
HyberV autostart change
bcdedit /set hypervisorlaunchtype auto
@uzbekdev1
uzbekdev1 / locale.cs
Created October 17, 2021 20:26
.net core json tim zone
services.AddControllers(). (options =>
{
options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.Local;
});
@uzbekdev1
uzbekdev1 / configure.bat
Created October 17, 2021 20:26
npm proxy
npm config set proxy http://usr:pass@192.168.15.3:8080
npm config set https_proxy http://usr:pass@192.168.15.3:8080
@uzbekdev1
uzbekdev1 / tz.bat
Created October 17, 2021 20:25
windows refresh timezone
tzutil /s "West Asia Standard Time"
How to force WIN 10 to sync with time server
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
w32tm /resync /force
@uzbekdev1
uzbekdev1 / docker.cmd
Created October 17, 2021 20:24
jaeger run docker
docker run -d --name jaeger -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 -p 5775:5775/udp -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14268:14268 -p 14250:14250 -p 9411:9411 jaegertracing/all-in-one:1.22