Skip to content

Instantly share code, notes, and snippets.

View superp's full-sized avatar

Pavlo Haleta superp

View GitHub Profile
@superp
superp / input_errors.html
Created April 16, 2014 06:54
Rails inputs errors structure
<!-- input without error -->
<input type="text" />
<!-- input with error -->
<div class="input_holder_error">
<input type="text" />
<span class="validation-error">Some error</span>
</div>
@superp
superp / foodporn.js
Created April 17, 2015 06:02
Easy foodporn
if (!window.jQuery) {
script = document.createElement('script');
script.type = "text/javascript";
script.src = "//code.jquery.com/jquery-1.10.2.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
setTimeout(function() {
jQuery(".ss-form-question .ss-choice-item input").unbind("change").change(function(){
var sum = 0;
@superp
superp / account.rb
Last active October 30, 2015 09:41
Invite module
class Account < ActiveRecord::Base
include SimpleTree
include Invitation
end