Skip to content

Instantly share code, notes, and snippets.

/**
* Copyright (c) 2023 Jacob Martin
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@dakom
dakom / ECS notes.md
Last active May 4, 2024 21:05
ECS with sparse array notes (EnTT style)

Intro

The below is a breakdown / bird's eye view of how a sparse-array backed ECS like EnTT or Shipyard works.

Please see the thanks and references at the bottom - without their help I would not have been able to share this breakdown with you... everything here is really just notes and rephrasing of what they've written already :)

Also, these notes do not cover archetype systems (like unity) nor adaptations of archetypes (like in Flecs). Though there's a couple comparative footnotes at the end.

Here we go!

@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active May 4, 2024 21:05
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

@aqrit
aqrit / despace.cpp
Last active May 4, 2024 21:04
remove whitespace characters
/*
* various methods to strip whitespace from text
* (aka. despace, leftpack, copy_if)
*
* 'whitespace' is considered the following bytes:
* 0x09 - tab
* 0x20 - space
* 0x0A - line feed
* 0x0D - carriage return
*/
@r1tsuu
r1tsuu / bump-payload.ts
Last active May 4, 2024 21:03
script to bump all Payload 3.0 related packages versions to latest.
/**
* Place this to ./src/scripts/bump-payload.ts
* Then in your package.json add script:
* "bump-payload": "tsx ./src/scripts/bump-payload.ts ./package.json && pnpm i"
* Run `pnpm bump-payload`
*/
import { execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
@veekaybee
veekaybee / normcore-llm.md
Last active May 4, 2024 21:03
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@alivarzeshi
alivarzeshi / Standardize_Arabic_Characters.sql
Last active May 4, 2024 21:01
The code updates textual columns in a SQL Server database to standardize specific Arabic characters across all tables.
USE [SQLdmRepository];
GO
-- Declare variables to store the names of the table and column currently being processed.
DECLARE @TableName NVARCHAR(MAX);
DECLARE @ColumnName NVARCHAR(MAX);
-- Declare a cursor to iterate over all textual columns in the database.
-- This cursor selects the name of the table and column from the system catalog views.
-- Only user tables (xtype = 'U') and specific textual column types are considered.
@simibac
simibac / currencies.json
Last active May 4, 2024 21:00
global currencies as list and sql script (157 currencies)
[
{
"code": "EUR",
"name": "Euro",
"name_plural": "euros",
"symbol": "",
"symbol_native": "",
"decimal_digits": 2,
"rounding": 0
},
@ihrke
ihrke / mclapply_expand_grid.R
Created May 31, 2017 14:52
how to use (mc)lapply together with expand.grid
library(tidyverse)
effs=seq(0, 1.0, by=0.05) # effect-sizes for which to calculate the design
rscales=c(sqrt(2)/2, 1, sqrt(2))
pars <- expand.grid(effs, rscales) %>% setNames(c("eff", "rscale"))
pars
lapply(data.frame(t(pars)), function(x) print(x))