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 'rails', '3.2.3' | |
gem 'mysql2' | |
gem 'logstasher' | |
gem 'logstash-event' | |
gem 'will_paginate' | |
gem 'jquery-rails', '2.0.2' | |
gem 'twitter-bootstrap-rails' |
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
$(document).ready(function(){ | |
window.addEventListener('popstate', function(event){ | |
alert(''); | |
}); | |
}); |
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 jhc(str) | |
t = 0 | |
s = str | |
n = s.size | |
(0..n-1).each do |i| | |
t += s[i].ord * (31**(n-1)) | |
end | |
puts t | |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.10' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2', "0.2.7" #v0.3 requires rails | |
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
create.js.erb => | |
alert("<%= @cart.id %>"); | |
$('#cart').html("<%= render @cart %>"); | |
_cart.html.erb => | |
<%= Time.now %> |
NewerOlder