Skip to content

Instantly share code, notes, and snippets.

View ngutman's full-sized avatar

Nimrod Gutman ngutman

View GitHub Profile
Verifying that +guti is my openname (Bitcoin username). https://onename.io/guti
### 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:
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
- (void)dragged:(UIPanGestureRecognizer *)gestureRecognizer
{
CGFloat xDistance = [gestureRecognizer translationInView:self].x;
CGFloat yDistance = [gestureRecognizer translationInView:self].y;
switch (gestureRecognizer.state) {
case UIGestureRecognizerStateBegan:{
self.originalPoint = self.center;
break;
};
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (!self) return nil;
self.panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(dragged:)];
[self addGestureRecognizer:self.panGestureRecognizer];
[self loadImageAndStyle];
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger , GGOverlayViewMode) {
GGOverlayViewModeLeft,
GGOverlayViewModeRight
};
@interface GGOverlayView : UIView
@property (nonatomic) GGOverlayViewMode mode;
@end
#import "GGOverlayView.h"
@interface GGOverlayView ()
@property (nonatomic, strong) UIImageView *imageView;
@end
@implementation GGOverlayView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
- (void)dragged:(UIPanGestureRecognizer *)gestureRecognizer
{
CGFloat xDistance = [gestureRecognizer translationInView:self].x;
CGFloat yDistance = [gestureRecognizer translationInView:self].y;
switch (gestureRecognizer.state) {
case UIGestureRecognizerStateBegan:{
self.originalPoint = self.center;
break;
};
#import "GGDraggableView.h"
@interface GGDraggableView ()
@property (nonatomic, strong) UIPanGestureRecognizer *panGestureRecognizer;
@end
@implementation GGDraggableView
- (id)init
{
#import "GGView.h"
#import "GGDraggableView.h"
@interface GGView ()
@property (nonatomic, strong) GGDraggableView *draggableView;
@end
@implementation GGView
- (id)init