Skip to content

Instantly share code, notes, and snippets.

View Brugarolas's full-sized avatar

Andrés Brugarolas Brugarolas

View GitHub Profile
@Brugarolas
Brugarolas / WebGL-WebGPU-frameworks-libraries.md
Created November 3, 2024 05:12 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@Brugarolas
Brugarolas / build.zig
Created October 15, 2024 15:44
Zig build for string library
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// Add static library
const lib = b.addStaticLibrary(.{
.name = "zig-string",
.root_source_file = b.path("src/string.zig"),
@Brugarolas
Brugarolas / adv_clean_m.lua
Created June 9, 2024 06:48
Lua Stuff (WIP)
-- @file adv[anced]_clean_m[odules].lua
-- @brief A clean module system for Lua, with caching
-- @author Andrés Brugarolas Martínez (2023)
-- Store original environment for possible future uses
_G.main_env = getfenv(1)
-- Store function references for performance optimization
local getfenv_local = getfenv
local setfenv_local = setfenv
@Brugarolas
Brugarolas / jetbrains.sh
Created May 18, 2024 00:23
Reset the free trial period in JetBrains products for Mac
#!/bin/bash
if [ "$1" = "--prepare-env" ]; then
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
mkdir -p ~/Scripts
echo "Copying the script to $HOME/Scripts"
cp -rf $DIR/runme.sh ~/Scripts/jetbrains-reset.sh
chmod +x ~/Scripts/jetbrains-reset.sh
@Brugarolas
Brugarolas / atomics.md
Created May 5, 2024 22:44 — forked from Azoy/atomics.md
Low-Level Atomic Operations
@Brugarolas
Brugarolas / AllocaStackAllocator.hpp
Last active May 3, 2024 02:58
AllocaStackAllocator.hpp
/**
* @file AllocaStackAllocator.hpp
* @brief AllocaStackAllocator for fast, temporary allocations on a per-thread basis.
* @author Andrés Brugarolas
*
* The StackAllocator is designed to provide efficient, alloca stack memory allocation
* within a pre-allocated memory block. It supports fast allocation and deallocation,
* caching of frequently used block sizes, and management of free space using an AVL tree.
*/
/**
* @file NanoFunction.hpp
* @brief A more efficient std::function replacement
* @author Andrés Brugarolas
* @version 1.0
*/
#pragma once
#include <functional>
@Brugarolas
Brugarolas / ParkingLot.zig
Created March 20, 2024 15:42 — forked from kprotty/ParkingLot.zig
Small & Fast synchronization primitives for Zig
pub fn ParkingLot(comptime Config: type) type {
return struct {
pub const Lock: type = Config.Lock;
pub const Event: type = Config.Event;
pub const nanotime: fn() u64 = switch (@hasDecl(Config, "nanotime")) {
true => Config.nanotime,
@Brugarolas
Brugarolas / nerd_fonts.md
Created March 15, 2024 19:46 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
@Brugarolas
Brugarolas / convert2arch_arm.sh
Created March 8, 2024 23:41 — forked from zengxinhui/convert2arch_arm.sh
Replace Oracle Cloud Linux with Arch Linux ARM remotely
[09/23/2023]
Refs:
1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/aarch64/alpine-virt-3.18.0-aarch64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
5. https://archlinuxarm.org/platforms/armv8/generic
See also: