Skip to content

Instantly share code, notes, and snippets.

View ghana7989's full-sized avatar
💭
I may be slow to respond.

pavan ghana7989

💭
I may be slow to respond.
View GitHub Profile
@ghana7989
ghana7989 / 1-setup.md
Created September 2, 2026 10:16 — forked from troyfontaine/1-setup.md
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.

@ghana7989
ghana7989 / restart-gpg.sh
Created June 18, 2025 04:21
GPG Agent restart script
function restart-gpg() {
echo "🔍 Checking for GPG lock files..."
# Remove any existing lock files
if [ -d ~/.gnupg ]; then
find ~/.gnupg -name "*.lock" -delete 2>/dev/null
rm -f ~/.gnupg/public-keys.d/pubring.db.lock 2>/dev/null
echo "🗑️ Removed lock files"
fi
# Leveraging Zustand for State Management in React: DevTools Integration & Data Persistence
Zustand is a minimalist state management library for React applications, offering a simple API and a variety of features. In this article, we will delve into how to effectively use Zustand in a React project, focusing on integrating with DevTools for easier debugging and persisting store data for a seamless user experience.
1. **Creating Modular Stores with Zustand:**
Zustand allows for the creation of modular stores to manage state efficiently as your application scales. Here’s a practical example of how to create modular slices and combine them:
```jsx
export const createUserSlice = (set) => ({
users: [],
@ghana7989
ghana7989 / MakeHidden.json
Created September 27, 2021 13:05
Visual Studio Code Settings Sync Gist
{
"workspaces": {}
}