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
| var http = require('http'); | |
| var assert = require('assert'); | |
| var gridform = require('gridform'); | |
| var formidable = require('formidable'); | |
| var mongo = require('mongo') | |
| , database = mongo.connect('mydb') | |
| , collection = database.collection('fs'); | |
| // assuming you've already created a db instance and opened it | |
| gridform.db = database; |
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
| #!/bin/bash | |
| # <UDF name="ssh_key" Label="Paste in your public SSH key" default="" example="" optional="false" /> | |
| # root ssh keys | |
| mkdir /root/.ssh | |
| echo $SSH_KEY >> /root/.ssh/authorized_keys | |
| chmod 0700 /root/.ssh | |
| # update to latest |
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)login{ | |
| NSURL *baseURL = [NSURL URLWithString:@"https://api.usergrid.com/[org]/[app]"]; | |
| AFHTTPClient* client = [[AFHTTPClient alloc] initWithBaseURL:baseURL]; | |
| [client setDefaultHeader:@"Accept" value:RKMIMETypeJSON]; | |
| [client registerHTTPOperationClass:[AFJSONRequestOperation class]]; | |
| NSDictionary *params = [[NSDictionary alloc] initWithObjectsAndKeys: | |
| @"password",@"grant_type", | |
| @"john.doe",@"username", | |
| @"password",@"password", | |
| nil]; |
NewerOlder