Skip to content

Instantly share code, notes, and snippets.

adamgit

Block or report user

Report or block adamgit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adamgit
adamgit / UnityTweakGUI.cs
Last active Jun 10, 2016 — forked from Danik/UnityTweakGUI.cs
A simple in-game parameter tweaking script for Unity. It finds all fields and properties marked with [TweakableMember] in MonoBehaviours in a scene, and enables tweaking in a GUI from inside the game, which can be useful on tablets etc, where there is no access to the inspector.
View UnityTweakGUI.cs
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
///<summary>
/// A simple in-game GUI for Unity that allows tweaking of script fields
/// and properties marked with [TweakableMember]
///</summary>
View MBExecutableAlgorithm
public interface MBExecutableAlgorithm<T>
{
public void execute( T dataSet );
}
View MicroBenchmarker
import tmachine.batchprocessors.MBExecutableAlgorithm;
import java.text.DecimalFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* Created by adam on 29/03/16.
View ProcPhysicsSetVelocities
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
public class ProcPhysicsSetVelocities
{
@adamgit
adamgit / gist:42253d7bb9320bbb49bf
Last active Aug 29, 2015
Unity3d: track a variable live in your GUI using drag/drop and Inspector (don't write a pointless class every time you need this)
View gist:42253d7bb9320bbb49bf
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Reflection;
/**
License: do whatever you want.
Questions etc: @t_machine_org
*/
@adamgit
adamgit / gist:3839993
Created Oct 5, 2012
VCLoadApplication method swizzle
View gist:3839993
@implementation UIView (swizzled)
-(void) swizzledSetNeedsDisplay
{
//if( _currentFrame != _lastDrawnFrame )
{
//[super setNeedsDisplay];
}
}
@end
@adamgit
adamgit / .gitignore
Last active Oct 24, 2019
.gitignore file for Xcode4 / OS X Source projects
View .gitignore
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@adamgit
adamgit / gist:3705459
Last active Sep 10, 2019
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
View gist:3705459
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)
You can’t perform that action at this time.