Skip to content

Instantly share code, notes, and snippets.

View tylr's full-sized avatar

Tyler Love tylr

View GitHub Profile
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
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' },
# 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)
DV.HSL = function(opts) {
var _defaults = {
hue: 0.0,
sat: 0.0,
lum: 0.0,
hex: null
};
this.config = $.extend(this._defaults, opts);
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) {
DV.Slideshow = (function() {
var _o = {};
var _enabled = null;
var _current = null;
var _current_img = null;
var _slides = [];
var _loaded = [];
function init(opts) {
DV.Slideshow = (function() {
var _o = {};
var _enabled = null;
var _current = null;
var _current_img = null;
var _slides = [];
var _loaded = [];
function init(opts) {
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;
DV.Slideshow = (function() {
var _o = {};
var _enabled = null;
var _current = null;
var _current_img = null;
var _slides = [];
var _loaded = [];
function init(opts) {
[user]
name = Tyler Love
email = github@tylr.org
[core]
editor = mate -w
excludesfile = /Users/tylr/.gitignore
[color]
diff = auto
branch = auto