This file contains 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
0:35 ~/test_workspace/blueprint $ blueprint create warrior -S | |
# [blueprint] searching for Python packages | |
# [blueprint] searching for configuration files | |
Traceback (most recent call last): |
This file contains 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
$(function() { | |
// Model | |
window.FeedItemModel = Backbone.Model.extend({ | |
initialize : function(id, graph) { | |
this.id = id; | |
this.graph = graph; | |
}, | |
This file contains 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 FBFeed = new JS.Class({ | |
include : Storage, | |
initialize: function(callingContext, feedUrl, feedReadyCallback) { | |
this.feedReadyCallback = feedReadyCallback; | |
this.callingContext = callingContext; | |
this.getFeed(feedUrl, feedReadyCallback); | |
}, | |
This file contains 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 Foo = { | |
init : function() { | |
Foo.getLocation(Foo.showLocation, this); | |
}, | |
showLocation : function(data) { | |
console.log("In showLocation callback => " + JSON.stringify(data)); | |
}, |
This file contains 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 FBNotificationWatcher = new JS.Class({ | |
initialize : function(timeout) { | |
this.url = "http://foo/return/json"; | |
this.getNotifications(); // initiate the first fetch | |
}, | |
getNotifications : function() { | |
var url = this.url; |
This file contains 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 Job = { | |
data : [ | |
"We are glad to see you here. This site is dedicated to", | |
"poetry and to the people who make poetry possible", | |
"poets and their readers. FamousPoetsAndPoems.com is", | |
"a free poetry site. On our site you can find a large", | |
"collection of poems and quotes from over 631 poets", | |
"Read and Enjoy Poetry", | |
"I, too, sing America", |
This file contains 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
/** | |
* | |
* Boilerplate code, used internally by the platform | |
* | |
* Notice the **config** variable being passed into the self-executing anonymous function. | |
* | |
* **config.api** object is an instance of the IJAppApi.v1 class. | |
* Any public methods present in the [IJAppApi.v1](../api/v1.html) can be called on config.api object | |
* | |
*/ |
This file contains 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
(function(config) { | |
var MyShaadi = { | |
auth : function(username, password, successCb, errorCb) { | |
var endpoint = "http://myshaadi.in/api/users/index.php?action=authenticateUser&resp_type=jsonp&username=" + | |
username + "&password=" + password; | |
$j.ajax({ | |
url : endpoint, | |
dataType : "jsonp", |
This file contains 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
db = connect("localhost:27017/test"); | |
var cursor = db.unicorns.find({gender : "m"}); | |
var total = 0; | |
while(cursor.hasNext()) { | |
var obj = cursor.next(); | |
total += (obj.hits || 0); | |
} | |
print(total); |
This file contains 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
############### GIT ################ | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "("${ref#refs/heads/}")" | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" |
OlderNewer