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
whitelist = ["volkskrant.nl", "nos.nl", "defacto.nl"] | |
whitelist.each do |url| | |
Onebox::Engine::WhitelistedGenericOnebox.whitelist.push url | |
end | |
# DEFAULT WHITELIST | |
# 23hq.com | |
# 500px.com | |
# about.com | |
# answers.com |
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
valid = false | |
operations = [] | |
formula = Formula.new(operations) | |
while !valid | |
operations << Operation.new( | |
AVAILABLE_OPERATORS["Multiplication"], | |
Constant.new(Float((rand(1...1000)*10))/100), | |
Constant.new(Float(1 + rand(1...40)).round(2)) | |
) | |
formula = Formula.new(operations) |
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
rake aborted! | |
Custom asset_path helper is not implemented | |
Extend your environment context with a custom method. | |
environment.context_class.class_eval do | |
def asset_path(path, options = {}) | |
end | |
end | |
(in /tmp/build_f2bc2012-1427-4301-843b-6531f4975e76/app/assets/stylesheets/active_admin.css.scss)/tmp/build_f2bc2012-1427-4301-843b-6531f4975e76/vendor/bundle/ruby/2.1.0/gems/sprockets-2.10.1/lib/sprockets/context.rb:241:in `asset_path' |
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
json (1.8.0) lib/json/common.rb:155:in `parse' | |
json (1.8.0) lib/json/common.rb:155:in `parse' | |
sir-trevor-rails (0.2.4) lib/sir-trevor/helpers/view_helper.rb:64:in `parse_sir_trevor' | |
sir-trevor-rails (0.2.4) lib/sir-trevor/helpers/view_helper.rb:9:in `render_sir_trevor' | |
app/views/learning_spaces/show.html.erb:46:in `block in _app_views_learning_spaces_show_html_erb___2846945259841152377_70125041516840' | |
activerecord (4.0.0) lib/active_record/relation/delegation.rb:13:in `each' | |
activerecord (4.0.0) lib/active_record/relation/delegation.rb:13:in `each' | |
app/views/learning_spaces/show.html.erb:33:in `_app_views_learning_spaces_show_html_erb___2846945259841152377_70125041516840' | |
actionpack (4.0.0) lib/action_view/template.rb:143:in `block in render' | |
activesupport (4.0.0) lib/active_support/notifications.rb:161:in `instrument' |
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
$(//selector).ready(function(element) { | |
setTimeout(function(){$(//selector).fadeOut()},2000); | |
}); |
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
var detectLanguage = function(successCB, errorCB) { | |
//Phonegap browser detection | |
if (navigator.globalization !== null && navigator.globalization !== undefined) { | |
navigator.globalization.getPreferredLanguage( | |
function (language) { successCB(language); }, | |
function (error) { errorCB(error); } | |
); | |
//Normal browser detection | |
} else { | |
if(window.navigator.language !== null && window.navigator.language !== undefined) { |
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
var api = "yourApiUrlGoesHere"; | |
/* | |
Method to do a GET request to the service | |
*/ | |
var getService = function (uri, failureFunction, errorFunction, successFunction) | |
{ | |
$.ajax({ | |
cache: true, | |
url: api+uri, |
NewerOlder