Skip to content

Instantly share code, notes, and snippets.

View UradaSources's full-sized avatar
😆

Urada UradaSources

😆
  • Taizhou city, Zhejiang Province, China
View GitHub Profile
@pancelor
pancelor / README.md
Last active January 7, 2025 19:06
aseprite to pico8/picotron exporter

picotron is out! importing sprites is still a bit tricky, so I built this script to help, along with this picotron cart

this script works great for pico8 too -- I use it often

how to use

you'll need Aseprite to use this.

  1. save this script to your aseprite scripts folder (File > Scripts > Open Scripts Folder) then reopen aseprite (or click "Rescan Scripts")
  • (optional) edit local autocopy in the script, based on your operating system. if you set this up, the script will automatically write to your clipboard when it's time to copy something
@eabase
eabase / HelloSDL2.cpp
Last active September 9, 2024 03:29
A minimal Hello World C++ example for using SDL2 to render text in a native Windows window.
//---------------------------------------------------------------------
// Name: HelloSDL2.cpp
// Author: EAML
// Date: 2021-05-16
//
// Description:
// A minimal PoC for producing a native SDL2 Windows app that can
// be ran from either Windows Explorer or from Powershell console.
// It's designed to use minimal command line, compiler options,
// and dependencies... It will display a gray window for 2 sec's.
@Kryzarel
Kryzarel / EasingFunctions.cs
Last active March 26, 2025 00:02
C# Easing Functions
using System;
namespace Kryz.Tweening
{
// Made with the help of this great post: https://joshondesign.com/2013/03/01/improvedEasingEquations
// --------------------------------- Other Related Links --------------------------------------------------------------------
// Original equations, bad formulation: https://github.com/danro/jquery-easing/blob/master/jquery.easing.js
// A few equations, very simplified: https://gist.github.com/gre/1650294
// Easings.net equations, simplified: https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts
@aras-p
aras-p / DebugNode.hlsl
Created January 3, 2020 10:37
"Print a value" custom function node code for Unity ShaderGraph
// Quick try at doing a "print value" node for Unity ShaderGraph.
// Tested on Unity 2019.2.17 with ShaderGraph 6.9.2.
//
// Use with CustomFunction node, with two inputs:
// - Vector1 Value, the value to display,
// - Vector2 UV, the UVs of area to display at.
// And one output:
// - Vector4 Color, the color.
// Function name is DoDebug.
@GrabYourPitchforks
GrabYourPitchforks / memory_docs_samples.md
Last active December 13, 2024 10:23
Memory<T> API documentation and samples

Memory<T> API documentation and samples

This document describes the APIs of Memory<T>, IMemoryOwner<T>, and MemoryManager<T> and their relationships to each other.

See also the Memory<T> usage guidelines document for background information.

First, a brief summary of the basic types

  • Memory<T> is the basic type that represents a contiguous buffer. This type is a struct, which means that developers cannot subclass it and override the implementation. The basic implementation of the type is aware of contigious memory buffers backed by T[] and System.String (in the case of ReadOnlyMemory<char>).
@martin31821
martin31821 / crc32.cs
Last active November 13, 2023 02:27
C# port of the crc32 algorithm
// inspired by http://opensource.apple.com//source/xnu/xnu-1456.1.26/bsd/libkern/crc32.c
// You may use this program, or
// code or tables extracted from it, as desired without restriction.
namespace CRC32
{
public static class CRC32
{
static readonly uint[] crc32_tab = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active February 10, 2025 15:37
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@kg4sgp
kg4sgp / ask-demod.c
Created November 8, 2013 17:40
An amplitude shift keying (ASK) demodulator.
// An ASK Demodulator
// Simplicity first. Get it working, then improve!
// gcc ask-demod.c -o askdemod -lm -Wall
// Usage: ./ask-demod ask-msg.raw ask-msg.txt
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>