Skip to content

Instantly share code, notes, and snippets.

View alemures's full-sized avatar

Alejandro Santiago alemures

View GitHub Profile
@leodutra
leodutra / bitwise-hacks.js
Last active September 21, 2025 01:23
Fast Int Math + Bitwise Hacks For JavaScript
/**
* Bitwise Mathematics Utilities
*
* A collection of fast bitwise operations for integer mathematics.
* These functions prioritize performance over readability and should be used
* when micro-optimizations are critical (game engines, real-time applications).
*
* References:
* - http://michalbe.blogspot.com.br/2013/03/javascript-less-known-parts-bitwise.html
* - http://jsperf.com/bitwise-vs-math-object
@tracker1
tracker1 / 01-directory-structure.md
Last active July 15, 2025 15:02
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@mycodeschool
mycodeschool / DoublyLinkedList.c
Created November 12, 2013 11:38
Doubly Linked List implementation in C
/* Doubly Linked List implementation */
#include<stdio.h>
#include<stdlib.h>
struct Node {
int data;
struct Node* next;
struct Node* prev;
};