Skip to content

Instantly share code, notes, and snippets.

@pollingj
pollingj / facebook-connect-cordova-adapter.js
Last active May 1, 2017 07:35
Ember Torri - PhoneGap Facebook Plugin
import Ember from "ember";
export default Ember.Object.extend({
open: function(authentication){
var userId = authentication.userId;
var token = authentication.accessToken;
var store = this.get('store');
return new Ember.RSVP.Promise(function(resolve, reject){
Ember.$.ajax({
type: "POST",
<!DOCTYPE HTML>
<html ng-app="ChinookApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>
<script src="libs/angular-resource.min.js"></script>
<script src="app.js" type="text/javascript"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet">
<link rel="stylesheet" href="app.css">
@johndel
johndel / elements_controller_spec.rb
Created May 31, 2013 09:39
Simple controller spec for testing json response.
require 'spec_helper'
describe Api::ElementsController do
let!(:user) { FactoryGirl.create(:user) }
let(:fire) { FactoryGirl.create(:element, name: "fire") }
let(:uber_fire) { FactoryGirl.create(:element, name: "uber fire") }
let(:vesuvius) { FactoryGirl.create(:element, name: "vesuvius", parents: [fire, uber_fire, fire]) }
let(:kolumbo) { FactoryGirl.create(:element, name: "kolumbo", parents: [fire, uber_fire, fire]) }
@spmallette
spmallette / gist:885254
Created March 24, 2011 15:32
curl to rexster
## post an edge
curl -d "" -v http://localhost:8182/graphs/dexsample/edges?_outV=1024\&_inV=1025\&_label=friend
curl -v -X POST -H "Content-Type:application/json" -d '{name:"willa"}' http://localhost:8182/graphs/tinkergraph/vertices/100
curl -v -d 'age=(integer,100)' -X POST http://localhost:8182/graphs/tinkergraph/vertices/1
curl -v -d 'age=(list,((i,100)))' -X POST http://localhost:8182/graphs/tinkergraph/vertices/1
curl -v -X POST -H "Content-Type:application/json" -d '{"script":"g.v(1)"}' http://localhost:8182/graphs/tinkergraph/tp/gremlin