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 Less | |
class Engine | |
attr_reader :css | |
attr_reader :parser, :build_handler, :root_node | |
def initialize(less) | |
@less = less.dup | |
@parser = LessGrammarParser.new | |
@build_handler = BuildHandler.new | |
parse |
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
def youtube_video(url, text, height, width) | |
altered_text = text.gsub(url,"<iframe title='YouTube video player' class='youtube-player' type='text/html' width='#{width}' height='#{height}' src='#{url}' frameborder='0'></iframe>") | |
end | |
def vimeo_video(url, text, height, width) | |
ident_regexp = /\/[0-9]{3,}/ | |
url_ident = url.scan(ident_regexp).to_s | |
altered_text = text.gsub(url,"<p><iframe title='Vimeo Video Player' src='http://player.vimeo.com/video#{url_ident}' width='#{width}' height='#{height}' frameborder='0'></iframe></p>") | |
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 GoggleBox | |
require 'httparty' | |
class << self | |
attr_accessor :adapter | |
def adapter | |
@adapter ||= GoggleBox::TVRage | |
end | |
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 GoggleBox | |
require 'httparty' | |
autoload :TVRage, 'goggle-box/tvrage.rb' | |
autoload :TheTVDB, 'goggle-box/thetvdb.rb' | |
class << self | |
attr_accessor :adapter | |
def adapter | |
@adapter ||= GoggleBox::TVRage |
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 GoggleBox | |
# require 'httparty' | |
module TVRage | |
class Show | |
def self.search opts={} | |
"searching TVRage for shows with options #{opts.inspect}" | |
end | |
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
Seems he didn't understand - read from the bottom up. | |
Hi Paul, | |
I did apologize for the nature of the cold approach. No one fully appreciates it. Not even me. But sometimes it simply has to be done. | |
Again, it was the only form of contact I had for you. If you are not interested then that’s ok. Not everyone will be. | |
Have you any ROR friends outside of your company that are looking for new roles? | |
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
visa: /^4\d{15}(\d{0,3})?$/ | |
mastercard: /^(5[1-5]\d{4}|677189)\d{10}$/ | |
american express: /^3[47]\d{13}$/ | |
maestro: /^6759\d{12}(\d{2,3})?$/ | |
solo: /^6767\d{12}(\d{2,3})?$/ |
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 view (blah.html.erb) #### | |
<%= render partial: 'announcement', collection: Article.newest %> | |
#### _announcement.html.erb #### | |
<%= announce announcement, { format: 'bootstrap' } %> | |
#### Explanation #### |
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
## config/initializers/viddler.rb | |
Viddler.configure do |c| | |
c.api_key = '', | |
c.username = '', | |
c.password = '' | |
end | |
## None rails |