This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import os | |
| from datetime import datetime | |
| # only tested with immich server v2.1.0 | |
| # ========================= | |
| # CONFIG | |
| # ========================= | |
| API_KEY = "API_KEY" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "ViewController.h" | |
| @import CoreBluetooth; | |
| @interface ViewController () <CBCentralManagerDelegate> | |
| @property(nonatomic, strong) CBCentralManager *cbManager; | |
| @end | |
| @implementation ViewController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #source: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt | |
| c_cyan=`tput setaf 6` | |
| c_red=`tput setaf 1` | |
| c_green=`tput setaf 2` | |
| c_sgr0=`tput sgr0` | |
| parse_git_branch () | |
| { | |
| if git rev-parse --git-dir >/dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CGPoint velocity = [gestureRecognizer velocityInView:currentView]; | |
| if (velocity.x * lastGestureVelocity.x + velocity.y * lastGestureVelocity.y > 0) { | |
| //NSLog(@"gesture went in same direction"); | |
| } | |
| else { | |
| NSLog(@"gesture went in opposite direction"); | |
| } | |
| lastGestureVelocity = velocity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)viewDidLoad { | |
| [super viewDidLoad]; | |
| UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | |
| [button setTitle:@"BUTTON" forState:UIControlStateNormal]; | |
| [button setFrame:CGRectMake(50, 50, 150, 150)]; | |
| [self.view addSubview:button]; | |
| UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(invokePanGesture:)]; |