Skip to content

Instantly share code, notes, and snippets.

@reduz
reduz / godot_over_time1.md
Last active February 6, 2024 23:55
Godot source code in 2002

This is a walkthrough to the Godot codebase over time. I can't publish full repositories, but I will put here the interfaces of some APIs including the year they were created and how they looked like at the time.

2002, Larvotor

This was the first version of the engine as such. It was later on used to create Regnum Oline. This is source code where I am sure I can still put legally here. Here are some class interfaces.

Mesh class:

Toda Monad é um tipo genérico. Para um tipo genérico ser uma monad, ele tem que suportar a seguinte "interface":

Dado que nossa monad é o tipo M onde A é algum tipo de parâmetro, devem existir as seguintes funçÕes:

function pure(A): M<A>
function bind<B>(M<A>, A -> M<B>): M<B>

A função pure "injeta" um valor dentro da monad com contexto "neutro".

const reverse = (array) =>
array.reduce((acc, elem) => [elem].concat(acc), []);
const map = (array, fun) =>
reverse(array.reduce((acc, elem) => [fun(elem)].concat(acc), []));
const filter = (array, pred) =>
reverse(array.reduce((acc, elem) => pred(elem) ? [elem].concat(acc) : acc, []));
@armand1m
armand1m / .skhdrc
Last active May 2, 2024 18:00
⚙️ My yabai and skhd configuration files.
# open terminal
cmd - return : open -n -a "Terminal"
# open chrome
cmd + shift - return : open -n -a "Google Chrome"
# moves focus between windows in the current focused display
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
@nicbet
nicbet / build-arc-flatabulous.sh
Last active March 15, 2022 16:47
Arc-Flatabulous Theme on Ubuntu 20.04
#!/bin/bash
wget http://launchpadlibrarian.net/365856925/multiarch-support_2.27-3ubuntu1_amd64.deb
wget http://launchpadlibrarian.net/353281752/libsass0_3.4.8-1_amd64.deb
wget http://launchpadlibrarian.net/344203197/sassc_3.4.5-1_amd64.deb
sudo dpkg -i multiarch-support_2.27-3ubuntu1_amd64.deb
sudo dpkg -i libsass0_3.4.8-1_amd64.deb
sudo dpkg -i sassc_3.4.5-1_amd64.deb
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 7, 2024 19:39
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@mortie
mortie / chrono-cheat-sheet.md
Last active April 30, 2024 15:12
std::chrono cheat sheet for the every-day programmer

Chrono cheat sheet

For the every-day programmer who needs to get shit done instead of fighting type errors.

If your application deals with times in any meaningful way, you should probably want to actually store time_points and durations and what-not; chrono has a pretty rich vocabulary for talking about time-related concepts using the type system. However, sometimes you just need to do something simple, like timing how long something takes, which is where chrono becomes overly complex, hence this cheat sheet.

All examples will assume #include <chrono>.

I just want to time something, then print the result

@skypjack
skypjack / README.md
Created October 7, 2019 14:24 — forked from alanjfs/CMakeLists.txt
Pong with EnTT and Magnum

Pong

With Magnum and EnTT. An adaptation of ecs_pong which is example material for Flecs, another ECS framework, developed as a learning exercise of both Magnum, EnTT and ECS in general. Runs at a solid 60 fps, can you believe it?

pong2

There are NOTE markings left in the code to highlight various differences and things I struggled with and would have liked to have done.


@bradtraversy
bradtraversy / docker_wordpress.md
Last active May 4, 2024 09:16
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes