Skip to content

Instantly share code, notes, and snippets.

View tobyturnbullknokal's full-sized avatar

tobyturnbullknokal

View GitHub Profile
// Increase/decrease progress bar on button click
$(document).ready(function() {
$('.appbutton').on('click', function(){
var currentVal = $('#signup-progress').val();
currentVal += 10;
console.log(currentVal)
});
});
if Rails.env.test?
has_attached_file :logo,
styles: { medium: '300x300>', thumb: '100x100>' },
default_url: '/images/:style/missing.png'
else
has_attached_file :logo,
styles: { medium: '300x300>', thumb: '100x100>' },
default_url: "http://#{ENV['AWS_ASSETS_BUCKET']}.#{ENV['AWS_BUCKET_ZONE']}.amazonaws.com/businesses/logos/default/missing.png",
storage: :s3,
s3_credentials: "#{Rails.root}/config/aws.yml",
$(window).on('resize', function () {
if ($(window).width() <= 700) {
$('.pricing-slides').insertAfter('.pricing-premium');
console.log("hello");
} else if ($(window).width() > 700) {
$('.pricing-slides').insertBefore('.pricing-premium');
console.log("bye");
};
}).trigger('resize');
http://malware.wicar.org/data/eicar.com
class CreateRatings < ActiveRecord::Migration
def change
create_table :ratings do |t|
t.references :comment, index: true, foreign_key: true
t.references :user, index: true, foreign_key: true
t.integer :score
t.string :default
t.string :0
t.timestamps null: false
Davids-MacBook-Pro:Knokal-Phase-1 tobyturnbull$ rake db:migrate
rake aborted!
SyntaxError: /Users/tobyturnbull/Knokal-Phase-1/db/migrate/20160516001302_create_ratings.rb:8: syntax error, unexpected tINTEGER, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
FactoryGirl.define do
factory :rating do
comment nil
user nil
score 1
default "MyString"
0 "MyString"
end
end
Davids-MacBook-Pro:Knokal-Phase-1 tobyturnbull$ rake db:migrate
rake aborted!
SyntaxError: /Users/tobyturnbull/Knokal-Phase-1/spec/factories/ratings.rb:7: syntax error, unexpected tSTRING_BEG, expecting keyword_end
0 "MyString"
^