Skip to content

Instantly share code, notes, and snippets.

@clementgenzmer
clementgenzmer / FBAnimationPerformanceTracker.h
Last active September 18, 2023 23:02
FBAnimationPerformanceTracker
/*
* This is an example provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@billiegoose
billiegoose / ArduinoSerialBypass.ino
Created July 19, 2013 01:37
Use your Arduino as a direct USB to serial converter! Tested on an Arduino Duemilanove. Probably 3.3V TTL but worked for communicating with my supposedly 5V TTL HerkuleX servo at 115200 baud.
/*
* Arduino Serial Bypass - use an Arduino as a dumb USB 2 Serial Converter
*
* This code makes the Arduino not interfere with pins 0 and 1
* which are connected to RX and TX on the FTDI chip. This allows
* the data coming from the FTDI USB 2 Serial chip to flow directly
* to another device. Since RX and TX are labeled from the Arduino's
* point of view, don't cross the wires, but plug the device's
* RX wire into the RX pin 0 and the TX wire into the TX pin 0.
*
@fjolnir
fjolnir / tlc.lua
Last active February 15, 2024 15:01
LuaJIT ObjC bridge
The bridge is now located at https://github.com/fjolnir/TLC
@mikeash
mikeash / gist:1355671
Created November 10, 2011 18:28
Multiple return
// clang -W -Wall -Wno-unused-parameter -framework Foundation -fobjc-arc test.m
#import <Foundation/Foundation.h>
#define IDARRAY(...) ((id[]){ __VA_ARGS__ })
#define IDCOUNT(...) (sizeof(IDARRAY(__VA_ARGS__)) / sizeof(id))
typedef id (^Tuple)(int);