Skip to content

Instantly share code, notes, and snippets.

@aranm
aranm / gist:3916122
Created October 19, 2012 03:48
Require Config with jQuery
require.config({
paths: {
//3rd Party libraries
'knockout': 'knockout-2.2.0.debug',
'jquery': 'jquery-1.7.1',
'doubletap': 'jquery.doubletap',
'address': 'jquery.address-1.4.min',
'bootstrap': 'bootstrap-2.0.1',
'amplify': 'amplify',
'JQueryDictionary": "Utilities/JQueryDictionary',
@aranm
aranm / gist:1406610
Created November 29, 2011 21:34
iOS AudioSession Getting all USB Audio Ouputs
/* print a CFNumber */
void printCfNumber(CFNumberRef cfNum) {
SInt32 s;
if(!CFNumberGetValue(cfNum, kCFNumberSInt32Type, &s)) {
printf("***CFNumber overflow***");
return;
}
printf("%d", (int)s);
}
= The Feed is King (or Queen)
When creating a social network type application the feed is king, the most common query that will be run against your service will be a request to get the feed. There are of course many ways to model the feed and a couple of components that are required.
To do a very simple feed one might structure the data as follows:
Users follow other users
[cypher]
----

How to create a GraphGist

You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. Alternatively, you can put an AsciiDoc document in Dropbox and enter the public URL in the form.

This GraphGist shows the basics of using AsciiDoc syntax and a few additions for GraphGists. The additions are entered as comments on their own line. They are: //console for a query console; //hide, //setup and //output to configure a query; //graph and //table to visualize queries and show a result table.

Click on the Page Source button in the menu to see the source for this GraphGist.