Skip to content

Instantly share code, notes, and snippets.

View Antoine-Lassauzay's full-sized avatar

Antoine Lassauzay Antoine-Lassauzay

  • Unity3D
  • Montréal, Québec
View GitHub Profile
@Antoine-Lassauzay
Antoine-Lassauzay / audiocontrol2.conf
Created September 1, 2021 01:12
HifiBerryOS Flirc config
[controller:ac2.plugins.control.keyboard.Keyboard]
next = 163
playpause = 164
previous = 165
import haxe.io.Bytes;
/***
Back and forth conversion from Int32 to Int16, keeping sign information.
Of course, there will be a data loss if values are out of the range (2^15, 2^15]
***/
class Int32ToInt16 {
static function writeInt16(i : Int, b : Bytes)
{
@Antoine-Lassauzay
Antoine-Lassauzay / ModelLocator.h
Created February 20, 2015 16:02
Attempt to write a templated locator for Model (as in MVC). Views and controller can receive this object to use what they need.
#include "stdafx.h"
#pragma once
using namespace std;
class ModelLocator
{
map<string, AGObject*> m_models;
public:
ModelLocator() {}
~ModelLocator() {}
@Antoine-Lassauzay
Antoine-Lassauzay / localhost.pem
Last active December 30, 2015 04:39
1) Save locahost.pem and serve.py in project root 2) On the command line type, `open localhost.pem`, this will add the certificate to the list of trusted certificates 3) Build your game and run `python serve.py` 4) Make sure the Facebook is setup for secure browsing (secure canvas URL) 5) You should be able to run the game locally
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQCtyIl1Pxh8teznw7Y98zQdNmR3gyO/nILcCRJgwGw2hOUAiJjV
XqzuwzdXzmfWvmSLZ0v2zWnesj+F4NPkdd4HsJbTPTz/0FTogBOTROpFkkUrOfUs
B+Er/4P1Mu+mO6f74ytbzjQz7wnM0TDRwJuXu0kKlAj7TRTxfCMXG4RJKwIDAQAB
AoGBAJSQ2wqT/UAoWzartvHxJ31N0cfmIbqed7TaQI7cEebt58R0AoxumtKnq3ly
aI1KSTRwA54jb73Fjs7KLPuj1EI/nLQSwpZ3SV7oKA0nmjmEFjx8uWmdmyYBQfM8
+cciZ5OeglN/r+IqAWFllrCd2eysegcQOA0KecUUMYRtYhVZAkEA3a3igDgs27Tq
Gdc81bPeGJazEPeaIXx8Yew6SUr0gYUVDN/NdLRf9hvlbK4mUWSl/EaMpYp+MFOJ
+Q8xm77rTQJBAMiwVEEEJGcP3aPiRa9q4+4yqeDHZ57vrwGLch7knNX0gXRoq86u
EI+R0rCJkXlkc4+BPoz+1R9R1u/0f51umlcCQQCfIv/xueICCxrvWAN1Cj2K+0wr
@Antoine-Lassauzay
Antoine-Lassauzay / CachingTest.as
Created November 20, 2013 22:42
Sample code to verify that the cache is not working in AIR on mobile
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.utils.getTimer;
public class CachingTest extends Sprite{
private var request:URLRequest;
/*
ADOBE SYSTEMS INCORPORATED
Copyright 2008 Adobe Systems Incorporated. All Rights Reserved.
NOTICE: Adobe permits you to modify and distribute this file only in accordance with
the terms of Adobe AIR SDK license agreement. You may have received this file from a
source other than Adobe. Nonetheless, you may modify or distribute this file only in
accordance with such agreement.
*/
@Antoine-Lassauzay
Antoine-Lassauzay / gist:5452716
Created April 24, 2013 14:49
Cette boucle n'est pas optimisée. Que peut-on améliorer?
var textfieldNames:Array = new Array("t1", "t2", "t3", "t4", "t5");
var values:Array = new Array("a", "b", "c");
for (var i:int = 0; i < textfieldNames.length; i++)
{
var tf :TextField = this[ textfieldNames[i] as String ] as TextField;
for (var j:int = 0; j < values.length; j++)
{
if (i == j) {
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2Dvypw9pkGHRdEAEc8KOGWAAsYs91mlUgBD4FI3Gali0hwQYdzrqN6LfsX7ENQrwAgW6nYKOdrPRGIH3AFdvxmSCYYyloaomIdCD9zfFEgCHVISc8JYs6E/ZL0VuDo50mFbBxzOfW3D/nfZpXgPlqhnfjIc9EVHkVHaYcILtNmVXh9lqzihWNVIQIMPW8+Q/RIxd56RPwLkBeE2LRzpeuiN0/CUUEI0zdMnyq2Nf9iEGuuUs48SUPLYFhne5zP2vql14sI/S9zy/siMP5V74tW52Nq6Tyi+spJmA6mn2Hgr3W9O6QcipL080IkW2RJlGsfJpmjFTo/a0/4mh7oKmAQ== sshadmin@ayaka
@Antoine-Lassauzay
Antoine-Lassauzay / gist:1367462
Created November 15, 2011 16:13
Convert mxmlc library dependecy to FDT configuration XML
\-compiler\.(library-path|include-libraries)\+*\=/Users/[a-z]+/.m2/([a-zA-Z/\.0-9\-]+)
<AS3Classpath generateProblems="false" sdkBased="false" type="lib" useAsSharedCode="false">M2_REPOS/$2</AS3Classpath>
sendNotification\((\S+(,\s\S+)?)\);
dispatchEvent(new DataCarrierEvent($1));