Skip to content

Instantly share code, notes, and snippets.

View utkarshsethi's full-sized avatar
🎓
Focusing

Utkarsh Sethi utkarshsethi

🎓
Focusing
View GitHub Profile
@utkarshsethi
utkarshsethi / addkeys.sh
Created January 11, 2025 01:45 — forked from kwmiebach/addkeys.sh
Add public keys for a user to ~/.ssh/authorized_keys
#!/bin/bash
# GitHub SSH Key Updater
# ---------------------
# SECURITY WARNING: This script grants SSH access to your machine!
# Only add keys from GitHub users you absolutely trust with full SSH access to your system.
# Each added public key will allow that user to log into your machine via SSH.
#
# Purpose:
# Fetches and merges public SSH keys from a GitHub user into your ~/.ssh/authorized_keys file,
@utkarshsethi
utkarshsethi / STM32 CMSIS CHEATSHEET
Last active January 11, 2025 04:27
STM32 CMSIS CHEATSHEET
USART:
//BRR = (Pclk + (BaudRate / 2)) / BaudRate
static uint16_t calc_brr(uint32_t Pclk, uint32_t BaudRate)
{
uint16_t brr = (Pclk + (BaudRate / 2)) / BaudRate;
return brr;
}