Skip to content

Instantly share code, notes, and snippets.

@fahadysf
fahadysf / ssh_keys.txt
Last active March 25, 2026 04:10
SSH Public Keys for fahad@fy-mbp-mx - Alpine Linux / Cloud-Init Import
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUgVpineSLRh71SMq41wQAmVH3xWiAiFMja4C7Az8fNYTAy35kb0GmoMfGQHR0LVsPttY1DRvDV6Wy9Ko0Es02PApGAXwle1myeNtxxGSb5kGjEpFYkr09tl6PoKXm7mf0UPOz9D9mE43SM1RZ0/d5YL23Fv/1KM53L98L90OwyYNdbWO8rlG/a0+XkdoCK4qjAWvl6RML/5ZnHjzz2C41sxXYLNInmeIaxPrsFDXfzfw9/rP9K4VoGaLNkDACbqDihmhzjDuJm4HB10q9iJzVZG0FdHg9Yy8lXbLuHpS4TD1YbNu8TCvR5239YKhoogcgdhHcnIcHz5xb4k5KV57ylqhCK0wFh7hGvsnkteks+8LZP9NA7FQXmB7UMoUVtIYUI4mSrNyb8dpyAdF22VlNVX4/53nzWSGSbRHq6lIyYGuD3cnxQFjfTGRfSIkHOpLId4LpWwGT9IEgC2PIZLE55XG/EjMbBjcOubUmnZeSJtveVfwd1o1z5COvrtAb8HM= [email protected]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCywOMn146aQUDMKx7oQ0bB23VCdMWp68+HmBCs/a4ZYXywncqOCXCEA2jUDWCbhY+HEpodSXtILqjBvB2tlnjDAMVRUmpVUv9+rTcO7YCoyH2NLGFwRzV2KK8wUUWtmHsHFy+ztedQv8LNOn6EpndUYgDkXE8bpG9/axRT641sY88BU+bPryB4+Fd4f3LG/qBrMsxtG4iNxBf4OXOzJlVUgbLxzMDYbsAaOIY5uFrpBac2DGSH9Pxa1yq2ETEHcseoMdfRxgdp8E2DPpntvyzgYy6QgfpEoyVSI323qyUqQ1X7EnOlxrkJHtEubTpuyIhXCuQ4NuU0iMDSVXjVr7O/niPiJ0Wt+I8araTrdStWIeEg+d+g18fWKnP/orBKFpZX5DqDZPeKPL6muID5TyqDBvTz
{"version":"v0.13","download_url":"https://drive.google.com/drive/folders/1AMryOycMU_qu3TBAIGCqqR59u2Eio3Iq"}
# Requires elevated (Administrator) PowerShell session
param(
[Parameter(Mandatory=$true)]
[ValidateRange(1025, 65535)]
[int]$NewRdpPort
)
# --- Configuration ---
$RdpKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
@fahadysf
fahadysf / rdp-status-check.ps1
Created December 11, 2025 15:56
Powershell Script to Diagnose any issues in Remote Desktop (Incoming) Connectivity for the host.
#Requires -RunAsAdministrator
<#
.SYNOPSIS
RDP Health Check - Diagnoses Remote Desktop Service connectivity issues
.DESCRIPTION
Checks service status, listening ports, firewall rules, NLA settings,
user permissions, and network accessibility for RDP connections.
#>
param(
@fahadysf
fahadysf / gist:67342e359f334e58841484ee9f8767a4
Created September 10, 2025 09:25
Powershell-String-Replacement.ps1
# Set the paths for your files
$replacementListFile = "C:\temp\replace.txt"
$targetFile = "C:\temp\target.xml"
# Read the contents of the replacement list file
$replacementList = Get-Content -Path $replacementListFile
# Read the content of the target file into a single string
$content = Get-Content -Path $targetFile -Raw
@fahadysf
fahadysf / ghostty.config
Created September 9, 2025 10:56
Ghostty Dark Config
font-family = "JetBrainsMono Nerd Font Mono"
font-style = Regular
font-size = 13
font-thicken = true
adjust-underline-position = 40%
adjust-underline-thickness = -60%
cursor-style = block
cursor-style-blink = false
#!/bin/sh
dnsserver=“your-dns-server.ns.cloudflare.com"
host="your-record-name"
domain_name=“yourdomain.com”
cf_user_email="[email protected]"
cf_api_key=“—get-your-own-api-key--“
cf_zone_id="—get-your-own-zone-id—“”
cf_record_id=“check-your-own-record-id”
dnsrecord=$host.$domain_name
#!/usr/bin/env python3
"""
SCTP Client/Server
Author: Fahad Yousuf
This script implements a simple SCTP client/server using Python's socket module.
The server listens on port 62324 and the client connects to the server on the same port.
"""
#!/bin/bash
#
# Script to print out the current power cycles and capacity of Macbooks
# which provide this info.
# -------
CYCLE_COUNT=`system_profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'`
MAX_CAPACYTY=`system_profiler SPPowerDataType | grep "Maximum Capacity" | awk '{print $3}'`
echo "Cycle Count: $CYCLE_COUNT"
@fahadysf
fahadysf / Information.md
Created January 9, 2024 13:09
Kubernetes - Cloud Native Technologies Info