Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
$httpProvider.responseInterceptors.push([ | |
'$q', '$templateCache', 'activeProfile', | |
function($q, $templateCache, activeProfile) { | |
// Keep track which HTML templates have already been modified. | |
var modifiedTemplates = {}; | |
// Tests if there are any keep/omit attributes. | |
var HAS_FLAGS_EXP = /data-(keep|omit)/; |
.filter('timeago', function () { | |
/* | |
* time: the time | |
* local: compared to what time? default: now | |
* raw: wheter you want in a format of "5 minutes ago", or "5 minutes" | |
*/ | |
// parse string date to milliseconds | |
// Note: months are 0-based |
Replace the Auth options hash value having token: <TOKEN_FOR_TESTING_THAT_LASTS_FOR_A_DAY>
with an actual token. This token can be generated by the server side scripts and copied in. It supercedes the tokenUrl:
if set.
Just to be 100% sure, feel free to verify the validity of the JSON Web Token generated using jwt.io, JWT debugger. Oh, and the TTL is set to 86400 which is a day. Enough time to generate a token and play around with it.
Ps: If there are any amendments that I can make to improve clarity or fix issues, feel free to leave a comment below. I'll get a notification and act on it as soon as I can.
Ps 2: I was experiencing an issue with CORS and so I submitted the issue (and this code) to the annotator-dev mailing list. Check the July 2014 archives for an email with the subject ... '[annotator-dev] Integrating Site With AnnotateIt Store'.
files: | |
"/tmp/proxy.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
proxy_send_timeout 1200; | |
proxy_read_timeout 1200; | |
send_timeout 1200; |
/** | |
* I recently needed to upload a file from the phone's filesystem to S3 using temporary credentials | |
* (i.e. access key, secret key and session token) issued by an API for a React Native application, | |
* without the overhead of Base64 encoding the file and passing it over the bridge (as it could be | |
* several MB big), and wanted to avoid writing native code to do this. | |
* | |
* None of the S3 libraries online worked with the temporary credentials, but I figured out a | |
* solution using the official AWS SDK (which is good, as it supports all the relevant authentication | |
* out of the box) and the react-native-fetch-blob module, which allows you to upload directly from the | |
* filesystem with the correct Content-type header (as far as I can tell, React Native's fetch only |