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
require '../pidgin/lib/pidgin/dialect' | |
dialect :facebook do | |
# Filter invoked as soon as it's mounted | |
mount do |credentials| | |
end | |
# Filter should return boolean in response to determine | |
# if we really have access |
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
task :test do | |
credentials = DropboxCredentials.new(:access_key => '', :access_secret => '') | |
provider = DropboxProvider.new(:credentials => credentials) | |
mount = DropboxMount.new(:provider => provider) | |
fetcher = DropboxFetcher.new({ | |
:mount => mount, | |
:batch_size => 100, | |
:callbacks => { | |
:on_start => Proc.new { puts 'START' }, | |
:on_load => Proc.new { puts 'LOAD' }, |
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
# A provider must inherit from Pedofile::Provider::Base | |
# A Provider is a source of data (e.g. Dropbox, Twitter, Facebook, Instagram, SugarSync) | |
provider = DropboxProvider.new(:consumer_token => Pedofile::Token.new('xxx', 'xxx'), :access_token => Pedofile::Token.new('xxx', 'xxx')) | |
# A Mount inherits from Pedofile::Mount::Base | |
# A Mount acts as a Controller that massages data from a provider into a uniform format. | |
# mount.entries returns a list of entries | |
# mount.sync! will fetch new entries from a provider | |
mount = DropboxMount.new(:provider => provider) |
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
DV.HSL = function(opts) { | |
var _defaults = { | |
hue: 0.0, | |
sat: 0.0, | |
lum: 0.0, | |
hex: null | |
}; | |
this.config = $.extend(this._defaults, opts); |
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
DV.HSL = function(opts) { | |
var _defaults = { | |
hue: 0.0, | |
sat: 0.0, | |
lum: 0.0 | |
}; | |
this.config = $.extend(this._defaults, opts); | |
this.hue_to_rgb = function(p, q, t) { |
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
DV.Slideshow = (function() { | |
var _o = {}; | |
var _enabled = null; | |
var _current = null; | |
var _current_img = null; | |
var _slides = []; | |
var _loaded = []; | |
function init(opts) { |
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
DV.Slideshow = (function() { | |
var _o = {}; | |
var _enabled = null; | |
var _current = null; | |
var _current_img = null; | |
var _slides = []; | |
var _loaded = []; | |
function init(opts) { |
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 offset_current_by(offset) { | |
return _slides[offset_index(offset)]; | |
}; | |
function offset_index(offset) { | |
var last = _slides.length - 1; | |
var idx = index_of(_current) + offset; | |
idx = (idx >= 0) ? idx : last + idx; | |
idx = (idx <= last) ? idx : idx - 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
DV.Slideshow = (function() { | |
var _o = {}; | |
var _enabled = null; | |
var _current = null; | |
var _current_img = null; | |
var _slides = []; | |
var _loaded = []; | |
function init(opts) { |
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
[user] | |
name = Tyler Love | |
email = github@tylr.org | |
[core] | |
editor = mate -w | |
excludesfile = /Users/tylr/.gitignore | |
[color] | |
diff = auto | |
branch = auto |