Skip to content

Instantly share code, notes, and snippets.

View henry232323's full-sized avatar
๐Ÿ™‚
:)

Henry henry232323

๐Ÿ™‚
:)
View GitHub Profile
@sinbad
sinbad / MeshRendererSortingEditor.cs
Last active January 28, 2025 17:11
Expose sorting layer in MeshRenderer inspector, for rendering on top of sprites
using UnityEngine;
using UnityEditor;
using System.Linq;
/// This just exposes the Sorting Layer / Order in MeshRenderer since it's there
/// but not displayed in the inspector. Getting MeshRenderer to render in front
/// of a SpriteRenderer is pretty hard without this.
[CustomEditor(typeof(MeshRenderer))]
public class MeshRendererSortingEditor : Editor
{
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 3, 2025 13:04
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'