Skip to content

Instantly share code, notes, and snippets.

View wighawag's full-sized avatar

Ronan Sandford wighawag

View GitHub Profile
@wighawag
wighawag / easings.js
Last active August 29, 2015 14:16 — forked from rezoner/easings.js
/*
A full list of simple easing equations inspired by GIST from greweb - https://gist.github.com/gre/1650294
Equations source - http://gsgd.co.uk/sandbox/jquery/easing/
*/
{
linear: function(t) {
return t
},
inQuad: function(t) {
@wighawag
wighawag / FlambeTest.hx
Created June 25, 2012 22:36
A test of flambe renderring engine
package ;
import flambe.platform.flash.Stage3DRenderer;
import flash.Lib;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.BitmapData;
@wighawag
wighawag / Main.hx
Created July 24, 2012 15:49
Generics Type parameter used as Type Constraint for method Generic Type parameter
package ;
class Main
{
static public function main()
{
var entity = new Entity();
var component0 = entity.get(EntityComponent); // shoudl pass
var component1 = entity.get(TestEntityComponent); // should pass
//var component2 = entity.get(TestModelComponent); // should fail
@wighawag
wighawag / TestAll.hx
Created February 11, 2016 08:15
Haxe telemetry in a unit test
#if HXCPP_TELEMETRY
public function testAllocation(){
var instanceUnderTest = new Testing();
//start telemetry
var threadNum = untyped __global__.__hxcpp_hxt_start_telemetry(true, true);
instanceUnderTest.methodThatShoulDoNoAllocation();
@wighawag
wighawag / keybase.md
Created August 11, 2016 09:44
keybase.md

Keybase proof

I hereby claim:

  • I am wighawag on github.
  • I am wighawag (https://keybase.io/wighawag) on keybase.
  • I have a public key whose fingerprint is 79DF EDC5 56D2 B807 AD47 0D82 5F10 21BE 15ED 8F8E

To claim this, I am signing this object:

@wighawag
wighawag / Main.hx
Last active March 21, 2017 17:50
Kha White Noise
import kha.System;
import kha.Scheduler;
class Main{
public static function main(){
System.init({
title: "dsp",
width: 800,
height: 600,
}, initialized);
0xAe6168Fd940F30A31Fb31F60Ce86291AF26ef31B
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
did:muport:QmWobx7edwuj8D7iiBMF3L6Mzt91jzZq5dLgEV1fAyHkPV
@wighawag
wighawag / ERC165Query.sol
Created May 30, 2019 21:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.20+commit.3155dd80.js&optimize=false&gist=
pragma solidity ^0.4.20;
contract ERC165Query {
bytes4 constant InvalidID = 0xffffffff;
bytes4 constant ERC165ID = 0x01ffc9a7;
function doesContractImplementInterface(address _contract, bytes4 _interfaceId) external view returns (bool) {
uint256 success;
uint256 result;