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
gem 'devise' | |
gem 'omniauth' | |
gem 'omniauth-facebook' | |
gem 'omniauth-google-oauth2' | |
gem 'omniauth-windowslive' |
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
require 'benchmark' | |
n = 5000000 | |
class A | |
def initialize(attribute) | |
@attribute = attribute | |
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
--- fineuploader-3.0.js 2012-11-16 21:30:02.000000000 +0100 | |
+++ fineuploader-3.0.patched.js 2012-12-04 10:21:56.799781578 +0100 | |
@@ -1796,7 +1796,15 @@ | |
var protocol = this._options.demoMode ? "GET" : "POST" | |
var form = qq.toElement('<form method="' + protocol + '" enctype="multipart/form-data"></form>'); | |
- var queryString = qq.obj2url(params, this._options.endpoint); | |
+ // Params arn't given through form's action anymore but appened into it. | |
+ var queryString = qq.obj2url({}, this._options.endpoint); | |
+ for (paramName in params) { |
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 OneConnectionBeforeConfirm | |
extend ActiveSupport::Concern | |
included do | |
before_create :generate_confirmation_token | |
after_create :send_on_create_confirmation_instructions | |
end | |
# This actions are not properly trigerred because of the rest of our modifications. | |
before_create :generate_confirmation_token |
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
# This class assumes that you have ranges associated to a value | |
# and that you want to merge those values. This is, for instance, | |
# useful to count overlaps of date ranges. | |
# | |
# Example of uses: | |
# | |
# rm = RangeMixer.new(0..10, 0) | |
# rm.add(0..5){ |memo| memo + 1 } | |
# rm.add(0..5){ |memo| memo + 4 } | |
# |
NewerOlder