Skip to content

Instantly share code, notes, and snippets.

View BMTLab's full-sized avatar
🏢
Working from office

Nikita Neverov BMTLab

🏢
Working from office
View GitHub Profile
@BMTLab
BMTLab / StringExtensions.cs
Last active September 4, 2023 15:56
Common extensions methods to check strings in C#
namespace Common.TypeExtensions;
/// <summary>
/// Provides custom extension methods to interact with <see cref="System.String" />.
/// </summary>
[PublicAPI]
[DebuggerStepThrough]
public static class StringExtensions
{
#region Equals
@BMTLab
BMTLab / BMTLab.StaticLocalization.Schema.xsd
Created November 6, 2023 17:10
BMTLab.StaticLocalization.Schema
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!-- Language Item definition -->
<xs:complexType name="LanguageItem">
<xs:sequence>
<xs:element name="en" type="xs:string"/>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
@BMTLab
BMTLab / frsync.sh
Last active April 25, 2024 07:34
Wrapper for rsync, optimized for faster network transfers. It simplifies rsync's configuration to enhance usability & performance
#!/bin/bash
# shellcheck disable=SC2034
# Author: Nikita Neverov (BMTLab)
# Version: 2.1.7
readonly ERR_FRSYNC_INVALID_OPTIONS=101
#######################################
# frsync: Optimizes the file synchronization process from local to remote using rsync over SSH or vice versa.
@BMTLab
BMTLab / cdl.sh
Last active April 2, 2024 10:31
Combines 'cd' and 'ls' commands to change directories and immediately list their contents to speed up file system navigation
#!/bin/bash
# Author: Nikita Neverov (BMTLab)
# Version: 1.0.1
#
# cdl: Change the current working directory and list its contents (cd ... && ls -a).
# This function changes the current working directory to the specified directory
# or to $HOME if no directory is specified, and then lists the contents of the directory.
#
function cdl() {
@BMTLab
BMTLab / rider64.vmoptions
Last active May 16, 2024 11:03
IntelliJ IDEA Java ZGC VM Options for better performance
-Xmx16384m
-Xms4096m
-XX:+UnlockExperimentalVMOptions
-XX:+IgnoreUnrecognizedVMOptions
-XX:+UseZGC
-Xss3M
-XX:+UseStringDeduplication
-XX:+UseClassDataSharing
-XX:+PerfDisableSharedMem
@BMTLab
BMTLab / clean.sh
Last active May 23, 2024 11:52
POSIX compatible script is designed to clean specified directories and files in a project
#!/bin/sh
# Author: Nikita Neverov (BMTLab)
# Version: 2.1.1
# Description: This sh POSIX compatible script is designed to clean specified directories and files in a project.
# It provides a flexible way to remove build artifacts, temporary files, and other not needed directories and files.
#######################################
# Clean directories matching a specific pattern.
@BMTLab
BMTLab / clean.ps1
Last active May 23, 2024 11:51
Script is designed to clean specified directories and files in a project
<#
.SYNOPSIS
This script is designed to clean specified directories and files in a project.
It provides a flexible way to remove build artifacts, temporary files, and other not needed directories and files.
.DESCRIPTION
This script offers a way to systematically remove unwanted files and directories from a project, improving cleanliness and maintainability.
.AUTHOR
Nikita Neverov (BMTLab)
@BMTLab
BMTLab / check-nuget-pkg-indexed.sh
Last active April 24, 2024 15:22
Script that checks if a NuGet package is indexed and available on nuget.org
#!/bin/bash
# Author: Nikita Neverov (BMTLab)
# Version: 2.0.2
# Description: Checks if a NuGet package is indexed and available on nuget.org.
# Used in CI/CD to automatically check if a dependency package is indexed before pushing a dependent package.
# Usage:
# chmod +x check-nuget-pkg-indexed.sh
@BMTLab
BMTLab / scripts_symlinks.sh
Last active May 2, 2024 16:19
Script that manages symbolic links for other scripts to allow for the creation or deletion of symbolic links, making scripts executable from anywhere