Skip to content

Instantly share code, notes, and snippets.

View johnfredcee's full-sized avatar
🚀
On an intergalactic cruise

John Connors johnfredcee

🚀
On an intergalactic cruise
View GitHub Profile
@makuto
makuto / DynamicTexture.cpp
Last active April 17, 2025 12:04
Procedural/Dynamic Texture System for Unreal Engine 4
//#include "GalavantUnreal.h" // Your game's header file here
#include "DynamicTexture.h"
// See https://wiki.unrealengine.com/Procedural_Materials
struct UpdateTextureRegionsParams
{
UTexture2D* Texture;
int32 MipIndex;
@jehugaleahsa
jehugaleahsa / join.ps1
Last active September 11, 2024 21:37
PowerShell Script to Split Large Files
function join($path)
{
$files = Get-ChildItem -Path "$path.*.part" | Sort-Object -Property @{Expression={
$shortName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
$extension = [System.IO.Path]::GetExtension($shortName)
if ($extension -ne $null -and $extension -ne '')
{
$extension = $extension.Substring(1)
}
[System.Convert]::ToInt32($extension)
@mattdesl
mattdesl / modular-three.md
Last active December 9, 2021 03:20
quick/easy ThreeJS hacking with npm

This isn't bullet-proof but here's how I've doing things lately:

modular ThreeJS quickie

  • npm install three --save
  • Include this in your browserify/webpack root script, typically your index.js:
global.THREE = require('three')
  • Add the "THREE" global to your linter (e.g. semistandard/eslintrc)
@bluecube
bluecube / noise.py
Last active May 8, 2018 11:28
Remix of some ideas of perlin noise and simplex noise...
import math
import numpy
_permutation = numpy.array([ 6, 36, 184, 45, 107, 67, 2, 34, 82, 181, 110, 188, 69, 152, 142, 0,
224, 154, 236, 203, 157, 73, 171, 115, 138, 66, 252, 165, 155, 60, 229, 95,
141, 202, 58, 132, 76, 94, 160, 53, 170, 242, 235, 81, 139, 84, 240, 153,
130, 148, 228, 97, 105, 201, 135, 237, 62, 232, 163, 136, 143, 255, 147, 178,
204, 127, 227, 249, 253, 77, 145, 91, 19, 72, 24, 108, 144, 233, 101, 40,
20, 37, 200, 29, 54, 27, 55, 46, 234, 50, 213, 64, 17, 231, 25, 10,
70, 146, 205, 222, 80, 162, 59, 86, 12, 125, 192, 124, 246, 83, 114, 93,
@mrcasals
mrcasals / PCG_AI.md
Last active October 28, 2020 14:58
PCG & AI interesting links - nucl.ai

If you want to add links here, leave a comment or ping me by Twitter or GitHub (@mrcasals on both platforms). You can find my email in my GitHub profile too!

PCG

Books & papers

@lbruder
lbruder / lbForth.c
Created April 6, 2014 15:21
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <[email protected]> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active April 25, 2025 03:09
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@gitaarik
gitaarik / git_submodules.md
Last active May 17, 2025 14:51
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@momchil-velikov
momchil-velikov / gist:8207534
Last active September 9, 2016 14:39
ISO C99 grammar
/* ISO/IEC 9988:1999 grammar (ISO C) */
%token ID TYPEDEF_NAME INT_CST STRING_CST SIZEOF ;
%token ARROW INC DEC ;
%token LSHIFT RSHIFT ;
%token LE GE ;
%token EQ NE ;
%token ANDAND OROR ;