Skip to content

Instantly share code, notes, and snippets.

View Gioele-Bencivenga's full-sized avatar

Gioele Bencivenga Gioele-Bencivenga

View GitHub Profile
@nicetrysean
nicetrysean / RandomUnique.hx
Last active November 8, 2023 23:36
Haxe can't really generate a Uniquely random number within an array.. until now!
package;
class RandomUnique
{
public static function between(startNumber : Int = 0, endNumber : Int = 9) : Array<Int>
{
var baseNumber : Array<Int> = new Array();
var randNumber : Array<Int> = new Array();
for(i in startNumber...endNumber){
@technion
technion / Password References.md
Last active May 4, 2024 01:21
A set of references on modern password policies

References on modern password policies

Below links provide source, reference link and relevant quote

Standards

NIST

https://github.com/usnistgov/800-63-3/blob/nist-pages/sp800-63b/sec5_authenticators.md

Verifiers SHOULD NOT impose other composition rules (e.g., requiring mixtures of different character types or prohibiting consecutively repeated characters) for memorized secrets. Verifiers SHOULD NOT require memorized secrets to be changed arbitrarily (e.g., periodically).However, verifiers SHALL force a change if there is evidence of compromise of the authenticator.

Major organisations

@Yanrishatum
Yanrishatum / heapsfaq.md
Last active May 1, 2024 18:04
An Unofficial Heaps FAQ

An Unofficial Heaps FAQ

I (Yanrishatum) see too many same questions. They irritate me.

Translation

"How dare you come into this chat and not realize that i am the GOD of heaps and that you MUST check out MY documentation1!!! Im veyr abngrey!!!" - translation from someone in chat.

Very accurate, I highly approve.

@01010111
01010111 / FlxEcho.hx
Last active April 29, 2021 17:25
Quick Flixel <-> Echo integration
package util;
import echo.data.Options.BodyOptions;
import flixel.FlxBasic;
import flixel.FlxObject;
import flixel.FlxObject.*;
import flixel.group.FlxGroup;
import echo.Echo;
import echo.World;
import echo.Body;
package fx;
class Dither extends flixel.system.FlxAssets.FlxShader
{
@:glFragmentSource('
#pragma header
const float scale = 2.0;
float checker(vec2 coord)
@AustinEast
AustinEast / ParticleEmitter.hx
Last active August 28, 2020 10:17
re-implementation of zerolib's ParticleEmitter.hx for HaxeFlixel, without zerolib
package;
import flixel.FlxSprite;
import flixel.group.FlxGroup;
import flixel.math.FlxPoint;
/**
* A particle emitter class.
*
* Originally written for zerolib by @01010111
@AustinEast
AustinEast / Outline.hx
Last active January 2, 2023 09:41
HaxeFlixel Pixel-Perfect Outline Shader
import flixel.system.FlxAssets.FlxShader;
import flixel.util.FlxColor;
class Outline extends FlxShader
{
@:glFragmentSource('
#pragma header
uniform vec2 size;
uniform vec4 color;
@AustinEast
AustinEast / .FlxEcho.md
Last active March 19, 2021 19:58 — forked from 01010111/FlxEcho.hx
Quick Flixel <-> Echo integration

2021 Update - The code in this Gist has been compiled into a haxelib for a more convenient experience! Please upgrade as this Gist will no longer be updated! Check out the repo here: https://github.com/AustinEast/echo-flixel

Quick and easy integration of Echo Physics with Haxeflixel! To get started follow these steps:

  1. Copy the content from 01-Project.xml to your own Project.xml.
  2. Create a new directory named util in the root of source code directory.
  3. Create a new file named FlxEcho.hx in the util directory.
  4. Copy the content from 02-FlxEcho.hx into the FlxEcho.hx file.

After that, you're ready to go! Check out 03-PlayState.hx to see a simple example of how to use FlxEcho.

@zzox
zzox / midiToJSON.js
Last active December 10, 2023 01:25
Convert midi files outputted by ableton into a json file with time of every note
const { Midi } = require('@tonejs/midi')
const { readFileSync, writeFileSync } = require('fs')
const FILENAME = process.argv[2]
const BPM = process.argv[3]
const DIR_SPECIFIC = process.argv[4] === "true"
const MS_PER_MINUTE = 60000
const ABLETON_PPQ = 96
try {