Skip to content

Instantly share code, notes, and snippets.

import * as React from 'react'
import { SpringValue, easings, useSpring } from 'react-spring'
/**
* Hook that animates height when args.animationKey changes
*
* Ex:
* const animatedBlock = useAnimatedHeight({
* animationKey: key,
* })
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active August 13, 2025 16:22
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines

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](https:

@kyledcline
kyledcline / postgres-best-practices.md
Last active August 8, 2024 13:30
Postgres Best Practices

PSQL CLI Client

Psql is a fully-fledged CLI client for Postgres, but most people are unaware of its many advanced features.

~/.psqlrc can be edited to persist any behavior or configuration settings you want between psql sessions. It behaves just like ~/.bashrc or ~/.vimrc, sourced at psql launch. See More out of psql for some interesting configurations.

If you have a long query to write and rewrite, you can use \e to edit your query in an editor.

Use \watch at the end of a query in order to automatically re-run the query every few seconds - great for monitoring while making changes elsewhere in your application architecture.

while :; do
currentOwner=$(lsof | grep -i VDC | awk -F '[^[:alnum:]]' '{print $NR}')
if [[ "$currentOwner" == "" && "$previousOwner" != "" && "$currentOwner" != "$previousOwner" ]]; then
previousOwner=""
osascript -e "display notification \"Camera deactivated\" with title \"Apple Camera\""
elif [ "$previousOwner" != "$currentOwner" ]; then
previousOwner=$currentOwner
osascript -e "display notification \"Camera activated by $currentOwner\" with title \"Apple Camera\""
fi