This file contains 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)openSettings | |
{ | |
BOOL canOpenSettings = (&UIApplicationOpenSettingsURLString != NULL); | |
if (canOpenSettings) { | |
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; | |
[[UIApplication sharedApplication] openURL:url]; | |
} | |
} |
This file contains 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 <QuartzCore/QuartzCore.h> | |
@interface <UITextViewDelegate> | |
#pragma mark | |
- (void)viewDidLoad{ | |
[super viewDidLoad]; |
This file contains 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
NSString *udid; | |
udid = [UIDevice currentDevice].identifierForVendor.UUIDString; |
This file contains 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
# Command Line to run from terminal | |
# Logs result to file s3_backup.log | |
# Command will run in the background | |
s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup.log 2>&1 & | |
# Crontab command to sync folder to S3 | |
# Command will run 1am every day and logs result to /root/s3_backup.log | |
0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup.log |
This file contains 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)application:(UIApplication *)application didReceiveRemoteNotification: (NSDictionary *)userInfo { | |
NSLog(@"userInfo:%@",userInfo); | |
badge_value+=[[[userInfo objectForKey:@"aps"] objectForKey:@"badge"]intValue]; | |
NSLog(@"Total badge Value:%d",badge_value); | |
for (id key in userInfo) { | |
NSLog(@"key: %@, value: %@", key, [userInfo objectForKey:key]); | |
} |
This file contains 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
<?php | |
$url = 'https://api.kontakt.io/beacon?proximity='; | |
$prox = 'f7826da6-4fa2-4e98-8024-bc5b71e0893e'; // Example UUID | |
$major = '37579'; | |
$minor = '51992'; | |
$privKey = 'insert-your-api-key-here'; |
This file contains 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
<?php | |
$url = 'https://api.kontakt.io/beacon/update?uniqueId='; | |
$prox = 'f7826da6-4fa2-4e98-8024-bc5b71e0893e'; // Example UUID | |
$did = 'lsuVg'; // Example Device ID, Unique ID | |
$alias = 'Example'; | |
$privKey = 'insert-your-api-key-here'; |
This file contains 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
# Xcode | |
.DS_Store | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 |
This file contains 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
mongorestore --host [IP/HOSTNAME] --port [PORT] --db [DB_NAME] --username [USER] --password [PASS] --collection [COLLECTION_NAME] dump/db/col.bson |
This file contains 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
apm list -b | grep [KEYWORD] | xargs apm uninstall |
OlderNewer