Skip to content

Instantly share code, notes, and snippets.

View hatemhosny's full-sized avatar

Hatem Hosny hatemhosny

View GitHub Profile
@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 / Exception_Handling.js
Last active December 16, 2021 07:18
Exception Handling
function notify(message) {
return new Promise((resolve, reject) => {
try {
let response = NotificationService.send(message);
resolve(response);
} catch (err) {
reject(err);
}
});
}
@hatemhosny
hatemhosny / TypeScript_Demo_for_testing_import_.md
Created November 1, 2021 23:50
TypeScript Demo (for testing import)
@hatemhosny
hatemhosny / Untitled_Project.md
Created November 1, 2021 23:49
Untitled Project