Skip to content

Instantly share code, notes, and snippets.

View jrolfs's full-sized avatar

Jamie Rolfs jrolfs

View GitHub Profile
@jrolfs
jrolfs / has_active.rb
Created December 1, 2012 02:13
has_active route
curl http://localdev.vid.io/v0/facebook/configurations/has_active\?session_id\=659ea28b5e75393f7a13addb5bcd0043\&page_id\=427939937270481
FB.api('427939937270481/tabs/app_488588774508915', function (response) { console.log(response)})
undefined
Object {data: Array[1], paging: Object}
data: Array[1]
0: Object
application: Object
id: "488588774508915"
name: "Vid.io (test)"
namespace: "vid_dot_io_test"
__proto__: Object
FB.api('427939937270481/tabs/app_488588774508915', function (response) { console.log(response)})
undefined
Object {data: Array[1], paging: Object}
data: Array[1]
0: Object
application: Object
id: "488588774508915"
name: "Vid.io (test)"
namespace: "vid_dot_io_test"
__proto__: Object
@jrolfs
jrolfs / gist:4192222
Created December 3, 2012 02:31
FB API response for page tab modification (console output)
FB.api('427939937270481/tabs/488588774508915', function (response) { console.log(response)})
Object {data: Array[1], paging: Object}
data: Array[1]
0: Object
application: Object
id: "427939937270481/tabs/app_488588774508915"
image_url: "http://photos-a.ak.fbcdn.net/photos-ak-snc7/v85006/87/488588774508915/app_10_488588774508915_117150173.gif"
is_non_connection_landing_tab: false
is_permanent: false
link: "http://www.facebook.com/VidioJamie?sk=app_488588774508915"
{
"yt_videos": {
"total_result_count": 6962,
"max_result_count": 50,
"offset": 1,
"videos": [{
"author": {
"name": "revision3",
"uri": "http://gdata.youtube.com/feeds/api/users/revision3"
},
order = params[:sort].to_sym rescue :published_at
direction = params[:order] == "asc" ? order = order.asc : order = order.desc
@videos = Youtubevideo.where(query_params).paginate({
:order => order,
:per_page => per_page,
:page => page
})
{
"author": {
"name": "ytvidio",
"uri": "http://gdata.youtube.com/feeds/api/users/ytvidio"
},
"categories": [{
"term": "People",
"label": "People & Blogs"
}],
"description": "When life gives you Clemens, make Clemenade..",
$.resolve = function(arg) {
var args = arguments,
sliceDeferred = [].slice,
i = 0,
length = args.length,
count = length,
rejected,
deferred = length <= 1 && arg && jQuery.isFunction(arg.promise) ? arg : jQuery.Deferred();
function resolveFunction(i, reject) {
npm ERR! Error: Not found: argparse@'>=0.1.8 <0.2.0'
npm ERR! Valid install targets:
npm ERR! ["latest"]
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:410:10)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:403:17
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:136:7)
npm ERR! at cb (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:36:9)
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
this.model.save()
.always(function () {
$button.spinContents(false);
})
.done(_.bind(function (response) { // TODO: fix error handling when we have proper codes
if (response.error) {
dispatcher.trigger('command:ShowAlert', {
icon: 'exclamation-sign',
message: 'Error ' + (this.invite ? 'inviting' : 'updating') + 'user · ' + response.error
});