Skip to content

Instantly share code, notes, and snippets.

View firemanxbr's full-sized avatar

Marcelo Barbosa firemanxbr

View GitHub Profile
@firemanxbr
firemanxbr / rhel9-sssd-samba-ad.md
Created April 29, 2025 07:10 — forked from swamikevala/rhel9-sssd-samba-ad.md
Configure RHEL9.5 with sssd, samba and AD (by OpenAI Deep Research)

RHEL 9.5 AD Integration with SSSD and Samba (Step-by-Step Guide)

Important Note: (18-Feb-2025) This gist has some issues. Please see the addendum. Thanks @hortimech for pointing this out

A step-by-step configuration guide for setting up RHEL 9.5 with SSSD and Samba for Active Directory integration. Covers all required configuration files, settings, and explanations for each option. Also sources for further documentation and troubleshooting recommendations:

  • Domain Joining with SSSD (configuring sssd.conf, realmd, Kerberos, and automatic authentication for SSH and Samba)
  • Samba Configuration with SSSD (using sss as the backend for identity mapping, Kerberos authentication, and ensuring smooth Windows/Mac access)
  • Kerberos-based Single Sign-On (SSO) (ensuring users can access SMB shares without re-entering credentials)
  • Offline Authentication (caching credentials for when AD is unreachable)
from typing import List, Dict, Optional
class ChatNode:
"""Represents a node in the chat flow tree."""
def __init__(self, text: str, color: Optional[str] = None):
self.text = text
self.color = color
self.children: List[ChatNode] = [] # List of child nodes
@firemanxbr
firemanxbr / 1-setup.md
Created November 19, 2024 20:45 — 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.

package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes"
appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/apps/v1"
"""
Splunk Interview Challenge
Description:
How many times does it happen in the input string that exactly
two 9s appeared after each other?
String:
"9234997799123"
"""
#!/bin/sh
## +-----------------------------------+-----------------------------------+
## | |
## | FANCY BASH PROMT |
## | |
## | Copyright (c) 2018, Andres Gongora <[email protected]>. |
## | |
## | This program is free software: you can redistribute it and/or modify |
## | it under the terms of the GNU General Public License as published by |
class Employee:
raise_amt = 1.04
def __init__(self, first, last, pay):
self.first = first
self.last = last
self.email = first + '.' + last + '@email.com'
self.pay = pay
class Employee:
raise_amt = 1.04
def __init__(self, first, last, pay):
self.first = first
self.last = last
self.email = first + '.' + last + '@email.com'
self.pay = pay
class Employee():
tax = 1.20
def __init__(self, first, last, pay, email):
self.first = first
self.last = last
self.pay = pay
self.email = email
def fullname(self):
@firemanxbr
firemanxbr / jstack.py
Created January 29, 2020 13:47
REVIEW PLEASE
#!/usr/bin/env python3
'''
JSTack Tool for Kubernetes environments
Libraries:
* connect_to_cluster()
* list_pod_namespace()
* collect_thread_dumps()
* upload_file()
* restart_application()