Skip to content

Instantly share code, notes, and snippets.

View chrisbsmith's full-sized avatar

Chris Smith chrisbsmith

View GitHub Profile
@troyfontaine
troyfontaine / 1-setup.md
Last active July 23, 2024 23:25
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 June 10, 2024 15:36
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