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
# Recursive page crawl using Scala & twitter-finagle | |
def crawl(url: String): Future[Seq[Resource]] = | |
fetch(url) flatMap { page => | |
Future.collect( | |
page.links map { u => crawl(u) } | |
) map { pps => pps.flatten } | |
} | |
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
"use strict"; | |
/** | |
* Grunt build & test helpers | |
*/ | |
module.exports = function(grunt){ | |
grunt.initConfig({ | |
jsdoc: { | |
dist: { |
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
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed. | |
* | |
* If you are unfamiliar with LESS, you can read more about it here: | |
* http://www.lesscss.org | |
*/ |
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
let g:spotify_track_search_url = "http://ws.spotify.com/search/1/track.json?q=" | |
function! OpenUri(uri) | |
exec "silent !explorer " . a:uri | |
endfunction | |
function! OpenLine() | |
let uri = b:uris[line(".")-2] | |
call OpenUri(uri) | |
endfunction |
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
"use strict"; | |
var _und = require('underscore'); | |
var ObjectUtils = {}; | |
/** | |
* Find and return an Object's keys which have the greatest values | |
* @param {Object} hash - values are integers or floats | |
* @returns {Array} - array of strings (keys) |
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
# | |
# You can do `Object.send :include, Introspection` | |
# Then you can call `.introspect` on anything. | |
# | |
# The `introspect` method returns a hash with information about the receiver | |
# including its Class, the Constants and instance_methods defined inside it. | |
# | |
# The "depth" parameter indicates how deeply it should inspect the object. | |
# By default there is no depth limit. Pass in 1 to just get info on the object itself. | |
# |
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
if (typeof define == 'function' && define.amd) | |
define(function() { return myObject }) | |
else | |
window.myObject = myObject |
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
<html> | |
<head> | |
<script src="lib/jquery-1.6.1.min.js"></script> | |
<script src="lib/json2.js"></script> | |
<script src="lib/underscore-min.js"></script> | |
<script src="lib/backbone-min.js"></script> | |
<script language="javascript"> | |
$(function(){ | |
var LoginView = Backbone.View.extend({ |
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
// Log any kind of Web Intent event to Google Analytics | |
// Category: "twitter_web_intents" | |
// Action: Intent Event Type | |
// Label: Identifier for action taken: tweet_id, screen_name/user_id, click region | |
// First, load the widgets.js file asynchronously | |
window.twttr = (function (d,s,id) { | |
var t, js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id; | |
js.src="//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); |
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
/* LIKE */ | |
FB.Event.subscribe('edge.create', function(href, widget) { | |
alert('You just liked the page!'); | |
}); | |
/* FEED DIALOG FB.UI | |
http://developers.facebook.com/docs/reference/javascript/FB.ui/ | |
http://developers.facebook.com/docs/reference/dialogs/ |