Skip to content

Instantly share code, notes, and snippets.

View hatemhosny's full-sized avatar

Hatem Hosny hatemhosny

View GitHub Profile
@hatemhosny
hatemhosny / tags.mjs
Created August 11, 2026 03:44
ID3 tags
import { ID3Writer } from "browser-id3-writer";
import fs from "fs";
fs.readdirSync(".").forEach((file) => {
if (!file.endsWith(".mp3")) return;
const [num, title = "", author = ""] = file.replace(".mp3", "").split(" - ");
const titleWithAuthor = author ? `${title} - ${author}` : title;
const year = new Date().getFullYear();
const language = file.includes("(En)") ? "eng" : "ara";
@hatemhosny
hatemhosny / .cursorrules
Created May 31, 2025 18:52 — forked from boxabirds/.cursorrules
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@hatemhosny
hatemhosny / change-extension.js
Created February 24, 2025 09:38
change extension from md to mdx using git
const { resolve } = require('path');
const { readdir } = require('fs').promises;
const { exec } = require('child_process');
const DIRECTORY = 'docs';
async function* getFiles(dir) {
const dirents = await readdir(dir, { withFileTypes: true });
for (const dirent of dirents) {
const res = resolve(dir, dirent.name);
@hatemhosny
hatemhosny / env.yaml
Created July 25, 2024 11:20
save GitHub secrets and vars to artifact
name: ENV
on: [push]
jobs:
create-envfile:
runs-on: ubuntu-latest
steps:
- name: Make secrets envfile
uses: SpicyPizza/create-envfile@v2.0
with:
@hatemhosny
hatemhosny / clojurescript-reagent-scittle.markdown
Created June 2, 2023 15:31
ClojureScript Reagent (Scittle)
@hatemhosny
hatemhosny / React_demo.md
Last active September 3, 2022 09:31
React demo
@hatemhosny
hatemhosny / index.html
Last active July 29, 2022 21:11
React Counter
<h1>React Counter</h1>
<div id="root">Loading...</div>