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 / 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": {}
}