Skip to content

Instantly share code, notes, and snippets.

View CreatureSurvive's full-sized avatar
:octocat:
melting an ancient GPU in Unity3d

Dana Buehre CreatureSurvive

:octocat:
melting an ancient GPU in Unity3d
View GitHub Profile
@CreatureSurvive
CreatureSurvive / UIImage+squareImage.h
Last active January 25, 2018 03:27
UIImage+squareImage
//
// UIImage+squareImage.h
//
// Created by CreatureSurvive on 1/24/18.
// Copyright © 2018 CreatureCoding. All rights reserved.
//
#import <UIKit/UIKit.h>
enum {
@CreatureSurvive
CreatureSurvive / BlockSyntax.md
Created November 27, 2017 03:22
Objectice-C Block Syntax

Declairing blocks in Objective-C

As a local variable:

returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};

As a property:

@property (nonatomic, copy, nullability) returnType (^blockName)(parameterTypes);
@CreatureSurvive
CreatureSurvive / plutil.sh
Last active November 27, 2017 03:27
Convert plist to json on OS X
plutil -convert json Data.plist -o Data.json
@CreatureSurvive
CreatureSurvive / UILabel+UtilityAttributes.h
Created June 24, 2017 17:29 — forked from PauloMigAlmeida/UILabel+UtilityAttributes.h
UILabel Util Categories for day-to-day use
//
// UILabel+UtilityAttributes.h
//
// Created by Paulo Almeida on 1/31/14.
//
#import <UIKit/UIKit.h>
@interface UILabel (UtilityAttributes)
NSString *html = @"<div style='font: 18pt Helvetica-Light; color: #3498DB;'>Blue Text<span style='color: #AAAAAA;'>GreyText</span></div>"];
NSData *htmlData = [html dataUsingEncoding:NSUTF8StringEncoding];
NSMutableAttributedString *htmlAttributedString = [[NSMutableAttributedString alloc] initWithData:htmlData options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType} documentAttributes:nil error:nil];
[label setAttributedText:htmlAttributedString];
@CreatureSurvive
CreatureSurvive / gist:fd2f63c6909ddc1b7c7a70db6c5305a0
Created June 22, 2017 23:18 — forked from bteapot/gist:31192edbc6de7f2ce5d4
UITableView expandable animated rows
#pragma mark - BTDurableView
@interface BTDurableView : UIView
@end
@implementation BTDurableView
//
@CreatureSurvive
CreatureSurvive / AViewController.h
Created April 23, 2017 04:10 — forked from andrassomogyi/AViewController.h
SFSafariViewController Objective-C example
#import <UIKit/UIKit.h>
@import SafariServices;
@interface AViewController : UIViewController
//
// ...
//
@end