Skip to content

Instantly share code, notes, and snippets.

View ayunav's full-sized avatar

Ayuna Vogel ayunav

View GitHub Profile
func profile(block:(()->())) {
let start = NSDate()
block()
let end = NSDate()
print(end.timeIntervalSinceDate(start))
}
//run your function/code inside the block below
profile({
@ayunav
ayunav / The Technical Interview Cheat Sheet.md
Created January 27, 2016 21:25 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@ayunav
ayunav / FSQSplitViewController.h
Created December 15, 2015 21:15 — forked from samgro/FSQSplitViewController.h
FSQSplitViewController
//
// FSQSplitViewController.h
//
// Copyright (c) 2015 Foursquare. All rights reserved.
//
#import "FSCoreViewController.h"
NS_ASSUME_NONNULL_BEGIN;
@ayunav
ayunav / PrettyRainbowUITableView.m
Last active August 29, 2015 14:27 — forked from theothertomelliott/PrettyRainbowUITableView.m
Pretty Rainbow UICollectionView
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// Get your cell here
cell.backgroundColor = [UIColor colorWithHue:(float)indexPath.row/[collectionView numberOfItemsInSection:indexPath.section] saturation:0.8 brightness:1 alpha:1];
// Do more stuff here
}
@ayunav
ayunav / segue.m
Last active August 29, 2015 14:26 — forked from mikekavouras/segue.m
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
id object = self.tableData[indexPath.row];
DetailViewController *viewController = segue.destinationViewController;
viewController.object = object;
}
self.imageViewName.image = [self.imageViewName.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[self.imageViewName setTintColor:[UIColor colorWithRed:85.0/255.0 green:172.0/255.0 blue:238.0/255.0 alpha:1]];
//just change imageViewName to whatever the name of your UIImageView is
//
// main.m
// TwelveDaysofXMas
//
// Created by Kaira Villanueva on 6/4/15.
// Copyright (c) 2015 apps. All rights reserved.
//
#import <Foundation/Foundation.h>
@ayunav
ayunav / homework.m
Last active August 29, 2015 14:22 — forked from mikekavouras/homework.m
//
// main.m
// Scan
//
// Created by Michael Kavouras on 6/9/15.
// Copyright (c) 2015 Mike Kavouras. All rights reserved.
//
#import <Foundation/Foundation.h>