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
apm list -b | grep [KEYWORD] | xargs apm uninstall |
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
wget --content-disposition -i list-of-links.txt | |
# Make sure your URLs are in the following format: http://www.example.com |
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
mongorestore --host [IP/HOSTNAME] --port [PORT] --db [DB_NAME] --username [USER] --password [PASS] --collection [COLLECTION_NAME] dump/db/col.bson |
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
<?php | |
$ip = $_SERVER['REMOTE_ADDR']; | |
//echo $ip; | |
// Docs: http://ip-api.com/docs/ | |
// Capped at 250 lookups/min - can unban yourself if you go over http://ip-api.com/docs/unban | |
$xml = simplexml_load_file("http://ip-api.com/xml/".$ip); | |
echo $xml->country; |
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
# Xcode | |
.DS_Store | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 |
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
<?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 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
<?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 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)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 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
# 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 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
NSString *udid; | |
udid = [UIDevice currentDevice].identifierForVendor.UUIDString; |
NewerOlder