Skip to content

Instantly share code, notes, and snippets.

View Dentrax's full-sized avatar
🎶
GNW's Not Wololooo!

Furkan Türkal Dentrax

🎶
GNW's Not Wololooo!
View GitHub Profile
@Dentrax
Dentrax / etcd-check.md
Last active June 4, 2024 07:48
ETCD - Interact in Kubernetes VM
  1. Export all the required environment variables:
export $(grep -v '^#' /etc/etcd.env | xargs -d '\n')
  1. Start interacting with etcdctl
etcdctl endpoint health status --cluster -w table && etcdctl endpoint status --cluster -w table
@Dentrax
Dentrax / config
Created May 30, 2023 06:32
~/.ssh/config for GitHub (macOS)
Host github.com
User git
Hostname github.com
AddKeysToAgent yes
IgnoreUnknown UseKeychain
UseKeychain yes
PreferredAuthentications publickey
IdentityFile /Users/USERNAME/.ssh/id_rsa
@Dentrax
Dentrax / go-benchstat.sh
Created July 24, 2023 06:26
Go Benchstat Diff
#!/bin/bash
set -e
set -u
set -o pipefail
command -v benchstat >/dev/null 2>&1 || { echo >&2 "I need Benchstat!"; exit 1; }
command -v git >/dev/null 2>&1 || { echo >&2 "I need Git!"; exit 1; }
BRANCH_TARGET="master"
@Dentrax
Dentrax / instagram-collection-migrate.py
Created July 24, 2023 06:29
Move Instagram Collections to Another
from instagrapi import Client
from instagrapi.exceptions import ClientLoginRequired, ClientError
import os
# Instagram accounts credentials
acc1_username = os.environ.get('IM_FROM_USERNAME')
acc1_password = os.environ.get('IM_FROM_PASSWORD')
acc2_username = os.environ.get('IM_TO_USERNAME')
acc2_password = os.environ.get('IM_TO_PASSWORD')
@Dentrax
Dentrax / gist:3481e2fb4eda4f5fac0371a0ccd1b02f
Last active May 27, 2025 14:18
Go: Preserving YAML comments when (un)marshaling

YAML Comment Preservation in Go (Using Structs)

This is a minimal example showing how to read, edit, and write YAML using Go structs while preserving comments, using the goccy/go-yaml library.

package main

import (
	"fmt"
	"os"