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 %> |
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
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
$(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
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
Error: 'undefined' is not an object (evaluating '$scope.data[i]') | |
@http://localhost:8000/panels/trends/module.js:164 | |
forEach@[native code] | |
forEach@http://localhost:8000/common/lib/uderscore.min.js:1 | |
@http://localhost:8000/panels/trends/module.js:184 | |
i@http://localhost:8000/common/lib/angular.min.js:76 | |
@http://localhost:8000/common/lib/angular.min.js:76 | |
$eval@http://localhost:8000/common/lib/angular.min.js:87 | |
$digest@http://localhost:8000/common/lib/angular.min.js:84 | |
$apply@http://localhost:8000/common/lib/angular.min.js:87 |
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
Filesystem Size Used Avail Use% Mounted on | |
/dev/sda 20G 9.3G 9.5G 50% / | |
udev 243M 4.0K 243M 1% /dev | |
tmpfs 99M 220K 99M 1% /run | |
none 5.0M 0 5.0M 0% /run/lock | |
none 246M 0 246M 0% /run/shm | |
none 100M 0 100M 0% /run/user |
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 "ostruct" | |
require "rest-client" | |
require "benchmark" | |
require "active_support/core_ext" | |
module ServiceRecord | |
def self.logger | |
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
def link_to_presenter(label,options) | |
url = link_to_content(label,options) | |
link_to label, url | |
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
require 'open3' | |
module ApplicationHelper | |
def link_to_presenter(item, options = {}) | |
label = options[:label] | |
url = content_link(item,options) | |
link_to label, url | |
end | |
OlderNewer