Skip to content

Instantly share code, notes, and snippets.

View itripn's full-sized avatar

Ron Forrester itripn

  • Artifact Uprising
  • PDX
View GitHub Profile
@tomohisa
tomohisa / gist:2897676
Created June 8, 2012 19:20
Add and Remove ChildViewController
// add child view
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, 320, 320);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
// remove child view
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];
@snej
snej / QRCode.m
Created September 21, 2015 16:48
Shows how to generate a QRCode on iOS or Mac OS X
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
typedef UIImage QRImage;
#else
#import <AppKit/AppKit.h>
typedef NSImage QRImage;
#endif
+ (QRImage*) QRCodeImageWithData: (NSData*)data size: (CGFloat)size {
@socketbox
socketbox / cube_solver.adoc
Last active May 23, 2022 21:17
Instructions for Solving Rubik's Cube as Presented by Robbie Gonzalez of Wired

Attributions

These instructions are an amalgam of steps presented by Wired’s Robbie Gonzalez, Phil of thecubicle.com, and JPerm of YouTube fame.

Definitions

A right trigger is R U R'

A left trigger is L' U' L

An r-alg is R U R' U'