Skip to content

Instantly share code, notes, and snippets.

View CodingAbdullah's full-sized avatar
🇨🇦

Abdullah Muhammad CodingAbdullah

🇨🇦
View GitHub Profile
@CodingAbdullah
CodingAbdullah / MDXImage.tsx
Created August 18, 2026 06:35
MDXImage custom MDX component
import Image from "next/image";
import type { MDXImageType } from "@/utils/types";
// MDXImage custom component
// Utilizes the built-in Next.js Image component as well as the figcaption element
export default function MDXImage(imageProperties: MDXImageType): React.JSX.Element {
return (
<figure className='text-center my-6'>
<div className="relative inline-block p-4 bg-gray-900/30 rounded-lg border-2 border-green-500 shadow-[0_0_15px_rgba(34,197,94,0.3)] transition-all duration-300 hover:shadow-[0_0_25px_rgba(34,197,94,0.5)] hover:scale-[1.02]">
<Image
@CodingAbdullah
CodingAbdullah / GitHubGist.tsx
Created August 18, 2026 06:33
GitHubGist custom MDX component
import type GitHubGistType from '@/utils/types/GitHubGistType';
import GistCopyButton from './GistCopyButton';
import GistCodeBlock from './GistCodeBlock';
import { GITHUB_USERNAME, GITHUB_GIST_LANGUAGE_MAP, GIST_BASE_URL } from '@/utils/constants';
export default async function GitHubGist({ id, figCaptionText }: GitHubGistType): Promise<React.JSX.Element> {
try {
const headers: HeadersInit = {
'Accept': 'application/vnd.github.v3+json',
};
@CodingAbdullah
CodingAbdullah / CodeBlock.tsx
Created August 18, 2026 06:27
CodeBlock custom MDX component
"use client";
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism';
import { toast } from 'sonner';
// Custom code block component for handling code in MDX files
// Visual Studio Code Dark Plus theme with copy functionality
const CodeBlock = ({ className = '', children }: { className?: string; children: string }): React.JSX.Element => {
const match = /language-(\w+)/.exec(className || '');
const language = match?.[1] || 'text';
@CodingAbdullah
CodingAbdullah / ArticleContent.mdx
Created August 18, 2026 06:17
Frontmatter for a MDX file
title Understand Dynamic MDX with Supabase
description Learn how to fetch, parse, and render dynamic MDX content from Supabase using Next.js and next-mdx-remote.
date 2025-06-03
tags
next.js
mdx
supabase
next-mdx-remote
dynamic content
@CodingAbdullah
CodingAbdullah / Daily Crypto Market Update Email.json
Created June 27, 2026 08:49
Daily crypto market update N8N workflow
{
"name": "Daily Crypto Market Update Email",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
@CodingAbdullah
CodingAbdullah / daily_market_update_n8n_workflow.json
Created May 18, 2026 00:10
Daily market update N8N workflow
{
"name": "Daily Crypto Market Update Email",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
@CodingAbdullah
CodingAbdullah / CLAUDE.md
Created May 16, 2026 19:24
Rust Token Killer a helpful Rust binary for saving on Claude Code token usage

RTK (Rust Token Killer)

This project uses RTK (Rust Token Killer) to reduce LLM context token usage by filtering, compacting, and summarizing noisy terminal output before it reaches Claude Code.

RTK Usage Rules

  • Prefer RTK-wrapped commands whenever possible.
  • If an RTK equivalent exists, use it instead of the raw command.
  • Avoid excessive terminal output that wastes context tokens.
  • Prefer focused inspection over dumping entire logs, diffs, or recursive directory trees.
@CodingAbdullah
CodingAbdullah / generate_audio.js
Created May 12, 2026 00:47
Eleven Labs TTS converting article text files to audio files
const fs = require('fs');
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '..', '.env') });
// Eleven Labs for TTS generation from Text files
const ELEVENLABS_API_KEY = process.env.ELEVENLABS_API_KEY;
const VOICE_ID = 'pNInz6obpgDQGcFmaJgB'; // Adam — professional male
const MODEL_ID = 'eleven_turbo_v2_5'; // Best cost-to-quality ratio
const MAX_CHARS = 4500; // ElevenLabs safe limit per request
@CodingAbdullah
CodingAbdullah / custom_chutes_api_call.sh
Created May 8, 2026 00:01
Bash script for running model inference to Chutes
#!/bin/bash
curl https://your-chutes-username-your-model-name.chutes.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_CHUTES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-hf-username/your-finetuned-model",
"messages": [
{
"role": "user",
@CodingAbdullah
CodingAbdullah / finetuned_chutes_model.py
Created May 7, 2026 23:48
Chutes AI model deployment
from chutes.chute import NodeSelector
from chutes.chute.template.vllm import build_vllm_chute
chute = build_vllm_chute(
username="your-chutes-username",
# Replace this with YOUR fine-tuned Hugging Face model
model_name="your-hf-username/your-finetuned-model",
node_selector=NodeSelector(