This file contains hidden or 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
PP.Rotator = function(){ | |
_rotator = { | |
_opts: { | |
interval: 5, | |
rotate: function(){} | |
}, | |
_timer: null, | |
start: function(){ |
This file contains hidden or 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
module API | |
def self.has_access?(token) | |
network = const_get token.for | |
network.has_access? token.key, token.secret | |
end | |
def display_files(files, token) | |
network = const_get token.for | |
network.display_files files, token.key, token.secret | |
end |
This file contains hidden or 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 Controller | |
def some_controller_action | |
ShitCan.skip_if_exists("#{params[:id]}_save_me") do | |
@blah = User.find_by_login(params[:id]) | |
@items = Ass.timeline(@dj.id.to_s) | |
@items.some_cpu_heavy_command | |
end | |
end |
This file contains hidden or 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
module ShitCan | |
require 'memcached' | |
def self.load(con_path='localhost:11211') | |
@cache = Memcached.new(con_path) | |
end | |
def self.cache | |
if @cache | |
return @cache |
NewerOlder