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 / 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
@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
//
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 / 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)
@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 / 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 / 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 / update-repo-cli.sh
Last active September 12, 2023 03:00
a simple cli interface for updating your Cydia repo quickly
# @Author: Dana Buehre <creaturesurvive>
# @Email: [email protected]
# @Filename: update-cli.sh
# @Copyright: Copyright © 2014-2018 CreatureCoding
#!/bin/bash
CLEAR='\033[0m'
RED='\033[1;31m'
YELLOW='\033[1;33m'
-(id)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath {
return [self getRowActions:tableView indexPath:indexPath];
}
-(id)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
return [self getRowActions:tableView indexPath:indexPath];
}
-(id)getRowActions:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath {
if (@available(iOS 11, *)) {
UIContextualAction *delete = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive
title:@"DELETE"
@CreatureSurvive
CreatureSurvive / BatchBurner.cs
Created June 16, 2018 17:09 — forked from luciditee/BatchBurner.cs
Batch Burner, a script designed to reduce static mesh draw calls in Unity scenes with a large number of static mesh entities.
/*
* Unity Batch Burner: A script designed to reduce static mesh draw calls automatically in scenes
* with a large amount of static geometry entities.
*
* Copyright 2016-2017 Will Preston & Die-Cast Magic Studios, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*