Generated using rake test
with EXTRAINFO=md
View gist:d5f0807a688071c88ddb
View Fade in
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
$(window).load(function(){ | |
$('body').ready(function() { | |
$('logo.png').hide(); | |
$('logo.png').each(function(i) { | |
if (this.complete) { | |
$(this).fadeIn(); | |
} else { | |
$(this).load(function() { | |
$(this).fadeIn(2000); | |
}); |
View gist:5164060
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
$.plot($("#graph7"), data, | |
{ | |
series: { | |
pie: { | |
show: true, | |
combine: { | |
color: '#999', | |
threshold: 0.1 | |
} | |
} |
View gist:5100252
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
.navbar-search{ :action => search_path, :method => "post" } | |
.input.search-query{ :name => "query", :class=>@query.blank? ? "swap_value" : "", :type => "text", :value => @query.blank? ? "Find your wine" : @query, :size => 80 } |
View gist:5095129
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
<h1>Raffler</h1> | |
<div ng-controller="RaffleCtrl"> | |
<form ng-submit="addEntry()"> | |
<input type="text" ng-model="newEntry.name"> | |
<input type="submit" value="Add"> | |
</form> | |
<ul> | |
<li ng-repeat="entry in entries"> |
View gist:5095113
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
$scope.addEntry = -> | |
$scope.entries.push($scope.newEntry) | |
$scope.newEntry = {} | |
$scope.drawWinner = -> | |
pool = [] | |
angular.forEach $scope.entries, (entry) -> | |
pool.push(entry) if !entry.winner | |
if pool.length > 0 |
View database.yml
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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html |
View error
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
middleware/request/oauth2.rb:62: warning: already initialized constant OAuth2 | |
=> Booting WEBrick | |
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/Users/davidwigder/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `initialize': no implicit conversion from nil to integer (TypeError) | |
from /Users/davidwigder/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `open' | |
from /Users/davidwigder/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `load_file' | |
from /Users/davidwigder/Desktop/rails_projects/emuze/config/initializers/tire.rb:1:in `<top (required)>' |
View metaphone.rb
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
def self.lookup(str, pos, length, last) | |
case str[pos, 1] | |
when /^A|E|I|O|U|Y$/ | |
if 0 == pos | |
return 'A', 'A', 1 | |
else | |
return nil, nil, 1 | |
end | |
when 'B' | |
return 'P', 'P', ('B' == str[pos + 1, 1] ? 2 : 1) |
View gist:3277867
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
class Subscription < ActiveRecord::Base | |
# Associations | |
belongs_to :user | |
has_many :payments, :dependent => :destroy | |
has_many :fulfillments, :dependent => :destroy | |
# Accessibles | |
attr_accessible :plan_type, :major_focus, :minor_focus, :start_date | |
# Validations | |
#validates :user, :presence => true |