Skip to content

Instantly share code, notes, and snippets.

View Ridys's full-sized avatar
🧿

Dmitry Ridys

🧿
  • Krasnoyarsk
  • 11:09 (UTC +07:00)
View GitHub Profile
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active April 27, 2025 17:08
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

@xbb
xbb / windows-firewall-cleanup.ps1
Last active September 9, 2024 19:44
Removes Windows Firewall program rules pointing to non-existing paths
# Usage: windows-firewall-cleanup.ps1 [-y]
# use -y parameter to actually remove the rules
param(
[switch]$y = $false
)
Get-NetFirewallApplicationFilter | ForEach-Object {
$program = $_.Program
if ([System.IO.Path]::IsPathRooted($program)) {
if (!(Test-Path -Path "$program" -PathType Leaf)) {
@iredun
iredun / Semantic.md
Created March 18, 2021 09:39
Перевод для себя как писать коммиты по Semantic

Правила написания коммитов

Это вольный перевод, упрощенный местами Angular commit style

Каждое сообщение коммита состоит из заголовка, тела и колонтитула. Заголовок имеет специальный формат, который включает тип и тему:

<type>: <subject>
<BLANK LINE>
<body>
<BLANK LINE>
@gh640
gh640 / use_mysqltuner_in_mariadb_container.sh
Last active February 20, 2025 09:31
Sample: Use MySQLTuner in `mariadb` Docker container
# MySQLTuner: https://github.com/major/MySQLTuner-perl
# Open Bash with the container.
docker exec [mariadb_or_mysql] bash
# Change the working directory to `/tmp`.
cd /tmp
# Install wget.
apt-get update
@maratori
maratori / .golangci.yml
Last active April 29, 2025 07:05
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v2.1.5
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).
@angela-d
angela-d / gpg-key-migration.md
Created April 1, 2018 23:57
Move GPG Keys from One Machine to Another

Migrate GPG Keys from One Workstation to Another

Replace [your key] with your key ID

To obtain your key ID

gpg --list-secret-keys --keyid-format LONG

Which returns something like

@sethryder
sethryder / blackbox.yml
Last active November 30, 2024 11:58
monitor multiple blackbox modules with a single job
modules:
https_2xx:
prober: http
timeout: 5s
http:
method: GET
no_follow_redirects: false
fail_if_ssl: false
fail_if_not_ssl: true
preferred_ip_protocol: "ipv4"
@Auke1810
Auke1810 / wpa-clean-header.php
Last active February 25, 2025 22:05
create a clean wordpress header and remove unnecessary clutter.
<?php
/*
Plugin Name: wordpress assist clean header
Plugin URI: http://www.wordpressassist.nl/
Description: Remove shortlink hook
Version: 1.0
Author: AukeJomm
Author URI: http://www.aukejongbloed.nl
*/
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 29, 2025 08:58
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE