Skip to content

Instantly share code, notes, and snippets.

View Dorifor's full-sized avatar
🤙

Mao Dorifor

🤙
View GitHub Profile
class_name ThreadInstancer
extends Node
## Instantiate a scene in a thread and adds its nodes to the scene tree in batches.
# Signals
signal scene_loaded(scene: PackedScene)
signal root_node_instantiated(node: Node)
signal node_instantiated(node: Node)
signal batch_instantiated
@LunaTheFoxgirl
LunaTheFoxgirl / 0. How to use.md
Last active March 2, 2025 11:06
Shell script to sign and notarize Unity App Bundles.

First get a Developer ID signing key from apple. You can get this through xcode if you're subscribed to their developer service.

Once you have a Developer ID in your keychain; you need to add a per-app password for notarytool. To do so go to your Apple account settings and add a new per-app-password; copy the password.

Run xcrun notarytool store-credentials --password "<INSERT PER-APP-PASSWORD HERE>" "notarytool".

After this you can add sign.sh and entitlements.plist to the outside of your Unity application, first time run chmod +x sign.sh. You can then run ./sign.sh <name of app>.app and wait.

a b s u r d _ s p a c e

thoughts about game engine minimalism

by Ben Porter

the machine

The absurd machine is an abstract video game machine with a minimal API:

@amitmerchant1990
amitmerchant1990 / console.js
Created January 24, 2025 08:07
Calculate used localStorage size for a website
let totalSize = 0;
for (let key in localStorage) {
if (localStorage.hasOwnProperty(key)) {
let keySize = new Blob([key]).size; // Size of the key
let valueSize = new Blob([localStorage[key]]).size; // Size of the value
totalSize += keySize + valueSize;
}
}
@hackermondev
hackermondev / research.md
Last active May 8, 2025 17:41
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k

@yasirkula
yasirkula / SnapRectTransformAnchorsToCorners.cs
Created May 28, 2024 18:20
Snap a RectTransform's anchors to its corner points in Unity
using UnityEditor;
using UnityEngine;
public class SnapRectTransformAnchorsToCorners : MonoBehaviour
{
[MenuItem("CONTEXT/RectTransform/Snap Anchors To Corners", priority = 50)]
private static void Execute(MenuCommand command)
{
RectTransform rectTransform = command.context as RectTransform;
RectTransform parent = rectTransform.parent as RectTransform;
@williamd1k0
williamd1k0 / EditorIconTexture.gd
Created May 6, 2024 23:46
Helper Texture class to use Godot Editor icons in plugins, such as main screen plugins.
@tool
class_name EditorIconTexture
extends AtlasTexture
var icon :String:
set(val):
icon = val
_update_icon.call_deferred()
func _init():
@bazhenovc
bazhenovc / the_sane_rendering_manifesto.md
Last active March 15, 2025 08:44
The Sane Rendering Manifesto

The Sane Rendering Manifesto

The goal of this manifesto is to provide an easy to follow and reasonable rules that realtime and video game renderers can follow.

These rules highly prioritize image clarity/stability and pleasant gameplay experience over photorealism and excess graphics fidelity.

Keep in mind that shipping a game has priority over everything else and it is allowed to break the rules of the manifesto when there are no other good options in order to ship the game.

Do not use dynamic resolution.

@passivestar
passivestar / Editor.tres
Last active January 12, 2025 21:14
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@Denchyaknow
Denchyaknow / Template_QuadTree_Spawns
Last active February 23, 2023 16:15
Template_QuadTree (Spawns) a spatial partitioning data structure to store your spawn points, so you can make queries to find the closest spawn point to a given point in a efficient way.
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace HunyLand.Utils
{
/// <summary>
/// QuadTree (Spawns) a spatial partitioning data structure to store your spawn points,
/// so you can make queries to find the closest spawn point to a given point in a efficient way.
/// Mage: Dencho