<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
<?php | |
require_once 'sdk.class.php'; | |
$s3 = new AmazonS3(); | |
$s3url = $s3->get_object_url('mybucket', 'mypath/tofile.txt', '5 minutes'); | |
echo $s3url; | |
?> |
//3. Deal with s3/file map | |
/*use Aws\Common\Aws; | |
use Aws\Common\Enum\Region; | |
$aws = Aws::factory(array( | |
'key' => AWS_ACCESS_KEY, | |
'secret' => AWS_SECRET_ACCESS_KEY, | |
'region' => Region::US_EAST_1, | |
'scheme' => 'http' //https will fail, WTF??! | |
)); |
<?php | |
$path = 'abc.jpeg'; | |
$ext = pathinfo($path,PATHINFO_EXTENSION); | |
echo $ext; |
- (MyCustomObject *)getObject { | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
NSData *MyCustomObjectEncodedObject = [defaults objectForKey:kMyCustomObjectKEY]; | |
MyCustomObject *MyCustomObject = (MyCustomObject *)[NSKeyedUnarchiver unarchiveObjectWithData: MyCustomObjectEncodedObject]; | |
return MyCustomObject; | |
} | |
- (void)setMyCustomObject:(MyCustomObject *)MyCustomObject { | |
NSData *MyCustomObjectEncodedObject = [NSKeyedArchiver archivedDataWithRootObject:MyCustomObject]; | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; |
{ | |
double delayInSeconds = 2.0; | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
//[DummyAssetsImporter importAssets:assets]; | |
}); | |
} |
#!/usr/bin/env bash | |
# Install dependencies | |
yum update -y | |
yum install -y gcc apr-devel apr-util-devel openssl-devel pcre-devel libxml2-devel libcurl-devel | |
mkdir setup && cd setup | |
wget http://apache.mirrors.pair.com//httpd/httpd-2.4.9.tar.gz | |
tar -xvf httpd-2.4.9.tar.gz |
// | |
// UIDeviceHardware.h | |
// | |
// Used to determine EXACT version of device software is running on. | |
#import <Foundation/Foundation.h> | |
@interface UIDeviceHardware : NSObject | |
+ (NSString *) platform; |
#!/bin/bash | |
# Script will output dumps for all databases using seperate files | |
# Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
USER="root" | |
PASSWORD="SnM1073k" | |
HOST="localhost" | |
MYSQL="$(which mysql)" | |
MYSQLDUMP="$(which mysqldump)" | |
OUTPUT_DIR="/backups/files" |