Skip to content

Instantly share code, notes, and snippets.

View chrisbsmith's full-sized avatar

Chris Smith chrisbsmith

View GitHub Profile
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active December 2, 2025 10:39
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.

@troyfontaine
troyfontaine / 1-setup.md
Last active December 1, 2025 15:11
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@welshstew
welshstew / oc-patch-new-envvars.groovy
Created September 25, 2016 08:27
simple bit of groovy to show how to execute an "oc patch"
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
//Simple example to show patching a container with new environment variables - need to have oc login before... :)
def dcToUpdate = "kie-app-postgresql"
def newEnvVars = [[name:"GROOVY_ROCKS", value: "true"], [name: "LOVE_OPENSHIFT", value: "of course"]]
def currentDC = new JsonSlurper().parseText(["oc", "get" , "dc" , dcToUpdate ,"-o" ,"json"].execute().text)
def containers = currentDC.spec.template.spec.containers
//add new env vars to container definition
@Khoulaiz
Khoulaiz / gist:41b387883a208d6e914b
Last active December 3, 2025 13:13
Checking ports without telnet

Here are several different ways to test a TCP port without telnet.

$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C

$ cat &lt; /dev/tcp/127.0.0.1/23