Skip to content

Instantly share code, notes, and snippets.

View quickfingers's full-sized avatar

Ezio Auditore da Firenze quickfingers

View GitHub Profile
<div id="header">
<div id="menu" class="col"></div>
<div id="logo" class="col">
<h1>JEY-EM ESPLANA</h1>
</div>
<div id="social" class="col">
<ul>
<li>
<a href="http://www.facebook.com/jmesplana"><img class="icon" src="src/img/facebook_icon.svg" target="_blank" alt="facebook icon"></a>
@quickfingers
quickfingers / MecanimStatesList
Last active August 29, 2015 14:16
Getting a list of mecanim states in Animator 4.3+
UnityEditorInternal.AnimatorController ac = GetComponent<Animator>().runtimeAnimatorController as UnityEditorInternal.AnimatorController;
UnityEditorInternal.StateMachine sm = ac.GetLayer(0).stateMachine;
for (int i = 0; i < sm.stateCount; i++)
{
UnityEditorInternal.State state = sm.GetState(i);
Debug.Log(string.Format("State: {0}", state.uniqueName));
}
@quickfingers
quickfingers / iOS Code Snippets.m
Last active August 29, 2015 14:07
iOS Code Snippets
// Avoiding compiler warnings. common example: deprecation notices or retain-cyle false positive
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"
id object = object?:[NSNull null];
#pragma clang diagnostic pop
// Creating a nonretained object value
id nonCopyable Object = ...;
id <NSCopying> copyableValue = [NSValue valueWithNonretainedObject:nonCopyable];
@quickfingers
quickfingers / VFRPDFReaderController
Created July 12, 2012 20:35
vfr reader view controller
//
// VFRPDFReaderController.h
//
#import <UIKit/UIKit.h>
#import "ReaderViewController.h"
@interface VFRPDFReaderController : UIViewController <ReaderViewControllerDelegate>
@end
//
// HelloWorldScene.mm
// presentation
//
// Created by Bogdan Vladu on 15.03.2011.
//
// Import the interfaces
#import "HelloWorldScene.h"
//#import "Gestures.h"