Skip to content

Instantly share code, notes, and snippets.

View ngutman's full-sized avatar

Nimrod Gutman ngutman

View GitHub Profile
21:10:35 906.473145 T:2764043328 INFO: AIRTUNES: Accepted IPv4 client on socket 21
21:10:35 906.474487 T:2764043328 INFO: AIRTUNES: Local: 10.0.0.66
21:10:35 906.475525 T:2764043328 INFO: AIRTUNES: Remote: 10.0.0.7
21:10:35 906.477905 T:2764043328 DEBUG: AIRTUNES: Receiving on socket 21
21:10:36 907.083984 T:2764043328 DEBUG: AIRTUNES: Got challenge: YQ7Sk2Rbpl5g1HewEkJ0tw==
21:10:36 907.086060 T:2764043328 DEBUG: AIRTUNES: Got response: ZN6MEU2yFFT+987kFlutSI5KCofPeMJjQpv/oX3DyGISkXqBgfeoBdAjjAqsmYvd9t7tdm376zFMGWVy+LDSTJIWJ9al8mBcp7W96LBI4EuIB2rT6kN/ERCtza7YN386mzfn25Ayu2B9asZ7/0TqqRXFqj7LjMMIJRBhUcThXDlSHtcpsQ1wloqOTv74T0vRjxe8lCi+H7QoD4XanvKmiUfS4RcEeQcoy+k+XowajdXVBHf8r3yA7nj8TC1ac/JkTwKBdQ5pNsR+ms7/rYmVBmbBQtVUrNobkudU6LaLDhCzrp4bfcsQnyMhxLe51ddG/OdIuQm/CWypxlH/2VkMbA
21:10:36 907.088318 T:2764043328 DEBUG: AIRTUNES: Handled request OPTIONS with URL *
21:10:36 907.102722 T:3037164320 INFO: CheckIdle - Closing session to http://r7---sn-cx1x9-ua8s.googlevideo.com (easy=0xaa6467d8, mult
### Keybase proof
I hereby claim:
* I am ngutman on github.
* I am guti (https://keybase.io/guti) on keybase.
* I have a public key whose fingerprint is 38B5 AEF7 BBA2 5AD8 B907 DC6C D529 0E9F DB87 F663
To claim this, I am signing this object:
Verifying that +guti is my openname (Bitcoin username). https://onename.io/guti
@ngutman
ngutman / gist:7609353
Created November 23, 2013 00:49
Add the segment control
- (void)viewDidLoad
{
[super viewDidLoad];
[self loadTab];
}
- (void)loadTab
{
self.segmentControl = [[UISegmentedControl alloc] initWithItems:@[@"View Controller 1",
@"View Controller 2"]];
@ngutman
ngutman / gist:7609362
Created November 23, 2013 00:50
Loading the default view controller
- (void)viewDidLoad
{
[super viewDidLoad];
[self loadTab];
[self loadViewController:[[GGViewController1 alloc] init]];
}
...
@ngutman
ngutman / gist:7609365
Created November 23, 2013 00:51
Animate the transition
- (void)loadViewController:(UIViewController *)vc
{
[self addChildViewController:vc];
if (!self.currentVC) {
[self.view addSubview:vc.view];
vc.view.frame = self.view.bounds;
self.currentVC = vc;
return;
}
@ngutman
ngutman / gist:7609358
Created November 23, 2013 00:50
GGViewController1
#import "GGViewController1.h"
@interface GGViewController1 ()
@end
@implementation GGViewController1
- (void)viewDidLoad
{
@ngutman
ngutman / gist:7609367
Created November 23, 2013 00:51
connect it to the tabTapped
- (void)tabTapped
{
if ([self.currentVC isKindOfClass:[GGViewController1 class]]) {
[self loadViewController:[[GGViewController2 alloc] init]];
} else {
[self loadViewController:[[GGViewController1 alloc] init]];
}
}
@ngutman
ngutman / gist:7609370
Created November 23, 2013 00:52
Add a direction to the animation
- (void)loadViewController:(UIViewController *)vc
fromLeft:(BOOL)fromLeft
{
[self addChildViewController:vc];
if (!self.currentVC) {
[self.view addSubview:vc.view];
vc.view.frame = self.view.bounds;
self.currentVC = vc;
return;
}
#import "GGView.h"
#import "GGDraggableView.h"
@interface GGView ()
@property (nonatomic, strong) GGDraggableView *draggableView;
@end
@implementation GGView
- (id)init