Skip to content

Instantly share code, notes, and snippets.

View DaMandal0rian's full-sized avatar

DaMandal0rian DaMandal0rian

  • QA
View GitHub Profile
@DaMandal0rian
DaMandal0rian / Git_Commit_Freeze_Solution.md
Created August 25, 2025 10:32 — forked from bahadiraraz/Git_Commit_Freeze_Solution.md
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.

@DaMandal0rian
DaMandal0rian / docker_cleanup.sh
Created October 24, 2024 15:46
Docker cleanup script
#!/bin/bash
echo "🚀 Starting Docker cleanup script..."
# Function to print colored output
print_message() {
local color=$1
local message=$2
case $color in
"red") echo -e "\033[0;31m$message\033[0m" ;;
@DaMandal0rian
DaMandal0rian / postgres_queries_and_commands.sql
Created September 25, 2023 16:53 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@DaMandal0rian
DaMandal0rian / reset-xcode-install.md
Created July 25, 2023 19:19 — forked from Justintime50/reset-xcode-install.md
Reset Your Xcode Installation on macOS

Reset your Xcode Install on macOS

Having troubles with Xcode or their Command Line Tools? Follow this guide to reset your Xcode instance on macOS and resolve issues such as "No Xcode or CLT version detected!"

1) Check if Xcode is installed

xcode-select -print-path
@DaMandal0rian
DaMandal0rian / git-deployment.md
Created February 15, 2023 13:08 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@DaMandal0rian
DaMandal0rian / crypt-squashfs.sh
Created May 4, 2022 20:06 — forked from jigpu/crypt-squashfs.sh
LUKS encrypt a squashfs disk image
#!/bin/sh
# https://martin.elwin.com/blog/2008/05/backups-with-squashfs-and-luks/
set -e
SQUASHFS_IMG="$1"
LUKS_IMG="$2"
CRYPTNAME=mkcrypt-$RANDOM
CRYPTDEV="/dev/mapper/$CRYPTNAME"
@DaMandal0rian
DaMandal0rian / elasticsearch.md
Created March 29, 2018 13:06 — forked from dominicsayers/elasticsearch.md
Configuring ElasticSearch to use less memory

What I actually did

/etc/security/limits.conf

elasticsearch hard memlock 100000

/etc/default/elasticsearch

var brwsr_guid = function() {
var nav = window.navigator;
var screen = window.screen;
var guid = nav.mimeTypes.length;
guid += nav.userAgent.replace(/\D+/g, '');
guid += nav.plugins.length;
guid += screen.height || '';
guid += screen.width || '';
guid += screen.pixelDepth || '';
#!/usr/bin/env bash
set -e
unset GIT_WORK_TREE
export GIT_WORK_TREE="/var/www/example.com"
export NODE_VERSION="8.9.3"
export NODE_ENV=production
# export NODE_PATH=/home/motif/bin/node