Skip to content

Instantly share code, notes, and snippets.

View delasy's full-sized avatar

Aaron Delasy delasy

View GitHub Profile
@delasy
delasy / gist:e15f3ec5971a7ca33d9dac713ad83100
Last active January 4, 2025 07:47
Check files in current folder start with a certain content (Node.js)
const fs = require("node:fs");
const path = require("node:path");
const banner = `<text-goes-here>`;
const exclusions = ["Dockerfile", "build"];
function traverseFolder (folderPath) {
const realFolderPath = fs.realpathSync(folderPath);
const entries = fs.readdirSync(realFolderPath, { withFileTypes: true });
@delasy
delasy / main.c
Created January 6, 2025 04:48
Find all files/folders case-insensitively matching search criteria
// cc main.c -o main.out
// ./main.out <path>
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <dirent.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@delasy
delasy / cla.md
Last active April 30, 2026 06:49

Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects ("Projects") made available by Aaron Delasy ("Licensor"). This Individual Contributor License Agreement ("Agreement") sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to the Licensor in respect of any of the Projects (collectively "Contributions"). If you have any questions respecting this Agreement, please contact aaron@delasy.com.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to the Licensor a non-exclusive, perpetual, irrevocable, worl