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
<VAST version="2.0"> | |
<Ad id="YuMe"> | |
<InLine> | |
<AdTitle><![CDATA[ Static YuMe VAST Tag]]></AdTitle> | |
<AdSystem>VPAID 1.0</AdSystem> | |
<Creatives> | |
<Creative> | |
<Linear> | |
<Duration>00:00:13</Duration> | |
<AdParameters> |
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
class ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
after_action :cors | |
layout false | |
def cors |
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
AdServer::Application.routes.draw do | |
# The priority is based upon order of creation: first created -> highest priority. | |
# See how all your routes lay out with "rake routes". | |
# You can have the root of your site routed with "root" | |
get '/wrapper.swf' => 'application#wrapper' | |
get '/vast.xml' => 'application#vast' |
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
class FLVActivities | |
extend Activities | |
activities :generate_flv, :upload_flv | |
... | |
end | |
class ScreenshotActivies | |
extend Activities |
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
class ResqueWeb | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env['PATH_INFO'].include? '/resque' | |
resque_web = Rack::Builder.new { | |
map "/resque" do |
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
(byebug) rule['Transition']['Date'].is_a?(Time) ? time.utc.iso8601 : Time.parse(time).utc.iso8601 | |
TypeError Exception: can't convert Nokogiri::XML::Builder::NodeBuilder to String (Nokogiri::XML::Builder::NodeBuilder#to_str gives Nokogiri::XML::Builder::NodeBuilder) | |
nil | |
(byebug) time | |
#<Nokogiri::XML::Builder::NodeBuilder:0x007fc0f1de5828 @node=#<Nokogiri::XML::Element:0x3fe078ef2ca0 name="time">, @doc_builder=#<Nokogiri::XML::Builder:0x007fc0f1dd3538 @doc=#<Nokogiri::XML::Document:0x3fe078ee977c name="document" children=[#<Nokogiri::XML::Element:0x3fe078ee9268 name="LifecycleConfiguration" children=[#<Nokogiri::XML::Element:0x3fe078ee8afc name="Rule" children=[#<Nokogiri::XML::Element:0x3fe078ee828c name="ID" children=[#<Nokogiri::XML::Text:0x3fe078ef9fc8 "Gaclierizer:1">]>, #<Nokogiri::XML::Element:0x3fe078ef1b34 name="Prefix" children=[#<Nokogiri::XML::Text:0x3fe078ef9b18 "1/videos">]>, #<Nokogiri::XML::Element:0x3fe078ef138c name="Status" children=[#<Nokogiri::XML::Text:0x3fe078ef9654 "Enabled">]>, #<Nokogi |
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
Language family Language name Native name 639-1 639-2/T 639-2/B 639-3 Notes | |
Northwest Caucasian Abkhaz аҧсуа ab abk abk abk | |
Afro-Asiatic Afar Afaraf aa aar aar aar | |
Indo-European Afrikaans Afrikaans af afr afr afr | |
Niger-Congo Akan Akan ak aka aka aka + 2 macrolanguage, Twi is [tw/twi], Fanti is [fat] | |
Indo-European Albanian Shqip sq sqi alb sqi + 4 macrolanguage | |
Afro-Asiatic Amharic አማርኛ am amh amh amh | |
Afro-Asiatic Arabic العربية ar ara ara ara + 30 macrolanguage, Standard Arabic is [arb] |
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 "bundler/capistrano" # ejecuta el bundle luego del deployment | |
# set(var, value) | |
set :rails_env, "production" | |
set :application, "example" | |
set :domain, "www.example.com.ar" | |
# una mejor explicacion de como trabajan los roles la pueden encontrar en https://github.com/capistrano/capistrano/wiki/2.x-From-The-Beginning | |
role :app, domain | |
role :web, domain |
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
def to_csv | |
header = Product.columns.map(&:name).join(',') | |
rows = Product.all.map do |record| | |
returning [] do |row| | |
Product.columns.each { |c| row << record.send(c) } | |
end.join(',') | |
end | |
[header, rows.join("\n")].join("\n") | |
end |
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
csv_data = FasterCSV.generate do |csv| | |
# por ahora todas pero habra que dejar afuera la imagen y los templates html | |
# headers | |
csv << Product.columns.map(&:name) | |
Product.all.each do |record| | |
csv << Product.columns.map { |c| record.send(c.name) } | |
end | |
end |
OlderNewer