Skip to content

Instantly share code, notes, and snippets.

@ryanzec
ryanzec / .editorconfig
Created August 23, 2014 21:50
My standard editor config file
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@ryanzec
ryanzec / index.gd
Last active July 6, 2024 14:33
Godot Reference
# wait signle frame
await get_tree().physics_frame
# signal emit deferred
SignalManager.emit_signal.call_deferred("minimap_set_target", main_camera, 1)
(func(): SignalManager.minimap_set_target.emit(main_camera, 1)).call_deferred()
# signal connect deferred
SignalManager.minimap_set_target.connect(on_minimap_set_target, Object.CONNECT_DEFERRED)
@ryanzec
ryanzec / index.tsx
Created February 16, 2025 19:41
cytoscape solidjs template
import styles from '$/core/components/cytoscape/cytoscape.sandbox.module.css';
import { loggerUtils } from '$/core/utils/logger';
import SandboxExamplesContainer from '$sandbox/components/sandbox-examples-container/sandbox-examples-container';
import cytoscape, { type LayoutOptions } from 'cytoscape';
import cytoscapeDagre from 'cytoscape-dagre';
import { onMount } from 'solid-js';
export default {
title: 'Components/Cytoscape',
};
@ryanzec
ryanzec / WorldSectionInitializerEntity.cs
Last active February 17, 2025 19:47
Unity custom editor from drag and drop to change the size of an area
using ProjectEdg.CoreModule;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
namespace ProjectEdg.WorldModule {
[ExecuteInEditMode]
public class WorldSectionInitializerEntity : MonoBehaviour {
// other code