Skip to content

Instantly share code, notes, and snippets.

View GennadySX's full-sized avatar
🦈

Gennady Sabirovsky GennadySX

🦈
View GitHub Profile
@GennadySX
GennadySX / HOC.tsx
Last active August 8, 2024 11:41
Сбер Спорт Рядом (Задача в интервью)
export const withShortenParagraph = (Component) => {
// make your HOC
return function ShortParagraph(props: {
textLength?: number;
redTextRegLimit?: number;
children: string;
}) {
const { textLength = 30, redTextRegLimit, children: text } = props || {};
const defaultLength = textLength < 1 ? text.length : textLength;
@GennadySX
GennadySX / cert.java
Created March 2, 2024 00:41 — forked from alessandroleite/cert.java
Generate a self signed X509 certificate with Bouncy Castle
//Generate a self signed X509 certificate with Bouncy Castle.
// StringBuilder sb = new StringBuilder();
//
// for (int i = 0; i < pub.length; ++i)
// {
// sb.append(Integer.toHexString(0x0100 + (pub[i] & 0x00FF)).substring(1));
// }
//
// System.out.println(sb);
// sb.setLength(0);
@GennadySX
GennadySX / nodejs-cicd-github-actions.md
Created April 19, 2023 00:03 — forked from danielwetan/nodejs-cicd-github-actions.md
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@GennadySX
GennadySX / checkpoint.sh
Created April 27, 2022 17:24 — forked from bubenkoff/checkpoint.sh
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
#
# Usage: ./checkpoint.sh
#
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
# Or, make an Automator action and paste the script.
@GennadySX
GennadySX / extend-trial-jetbrains-windows.bat
Created July 1, 2021 21:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@GennadySX
GennadySX / metrials-go.md
Created March 27, 2021 18:37 — forked from egorsmkv/metrials-go.md
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года