Skip to content

Instantly share code, notes, and snippets.

View PaulWoodIII's full-sized avatar

Paul Wood III PaulWoodIII

View GitHub Profile
@PaulWoodIII
PaulWoodIII / app.js
Last active December 11, 2015 05:48
Trying to get Gridform working but failed miserably: Gridform is here. http://aheckmann.github.com/gridform/ I need a form somewhere to make it easier to test on the browser. need a lot of modules in your project to get this to work in the first place winedb came from nodecellar code
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;
#!/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
@PaulWoodIII
PaulWoodIII / gist:4515120
Created January 12, 2013 00:12
Trivial case Login function for usergrid, using RestKit.
- (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];