Skip to content

Instantly share code, notes, and snippets.

View ShabbirHasan1's full-sized avatar

Xor Byte ShabbirHasan1

View GitHub Profile
@ShabbirHasan1
ShabbirHasan1 / SSH_MACOS_SECURE_ENCLAVES.md
Created April 1, 2026 04:38 — forked from arianvp/SSH_MACOS_SECURE_ENCLAVES.md
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@ShabbirHasan1
ShabbirHasan1 / remove-retweets.js
Created March 16, 2026 20:42 — forked from jbt95/remove-retweets.js
Remove retweets from profile
(() => {
// ========= CONFIG =========
const MAX_ACTIONS = 2000; // safety cap
const MAX_SCROLLS = 400; // safety cap
const MIN_DELAY_MS = 600; // slow down to look more human
const MAX_DELAY_MS = 1400;
const SCROLL_STEP_PX = 900;
// ========= HELPERS =========
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
@ShabbirHasan1
ShabbirHasan1 / twitter-remove-retweets.js
Created March 11, 2026 07:07 — forked from antlionguard/twitter-remove-retweets.js
With this script, you can remove all retweets you are retweeted on Twitter.
const timer = ms => new Promise(res => setTimeout(res, ms));
// Unretweet normally
const unretweetTweet = async (tweet) => {
await tweet.querySelector('[data-testid="unretweet"]').click();
await timer(250);
await document.querySelector('[data-testid="unretweetConfirm"]').click();
console.log('****// Unretweeted Successfully //****')
}
@ShabbirHasan1
ShabbirHasan1 / sysctl.conf
Created February 26, 2026 06:37 — forked from kfox/sysctl.conf
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
@ShabbirHasan1
ShabbirHasan1 / microgpt.py
Created February 12, 2026 09:21 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@ShabbirHasan1
ShabbirHasan1 / install-ndppd-active-ipv6-subnet.sh
Created January 30, 2026 18:48 — forked from kenshin17/install-ndppd-active-ipv6-subnet.sh
Script install NDP Proxy Daemon, active full subnet ipv6.
#!/bin/bash
# Author: kenshin17
# OS: Centos 7
# Description: Script install NDP Proxy Daemon, active full subnet ipv6.
IPv6SUBNET="xxxx:xxxx:xxxx:xxxx::/64"
echo "######################## CONFIG SYSCTL #########################"
echo "net.ipv6.conf.all.accept_ra = 2" >> /etc/sysctl.conf
echo "net.ipv6.conf.eth0.accept_ra = 2" >> /etc/sysctl.conf
@ShabbirHasan1
ShabbirHasan1 / mlx_memory.sh
Created December 27, 2025 18:31 — forked from ivanfioravanti/mlx_memory.sh
Script to set MLX memory limits
#!/usr/bin/env bash
# Default values for percentages
DEFAULT_WIRED_LIMIT_PERCENT=85
DEFAULT_WIRED_LWM_PERCENT=75
# Read input parameters or use default values
WIRED_LIMIT_PERCENT=${1:-$DEFAULT_WIRED_LIMIT_PERCENT}
WIRED_LWM_PERCENT=${2:-$DEFAULT_WIRED_LWM_PERCENT}
@ShabbirHasan1
ShabbirHasan1 / ContentView.swift
Created December 24, 2025 15:10 — forked from dkun7944/ContentView.swift
AirDrop iOS 17 Swift.Shader Animation
//
// ContentView.swift
// Airdrop Demo
//
// Created by Daniel Kuntz on 7/30/23.
//
import SwiftUI
struct ContentView: View {