Skip to content

Instantly share code, notes, and snippets.

View dankozlowski's full-sized avatar
🌲
Steady in the storm!

Dan Kozlowski dankozlowski

🌲
Steady in the storm!
  • Portland, OR
View GitHub Profile
# I need factories in the console!
require 'factory_girl'
FactoryGirl.find_definitions
1.9.3-p0 :005 > ul = Upload.first
Upload Load (0.3ms) SELECT "uploads".* FROM "uploads" LIMIT 1
=> #<Upload id: 7, title: "Week 1", desc: "Filled in PowerPoint notes, week 1", student_id: 83, course_id: 1996, attachment: "1.ppt", created_at: "2011-10-03 18:40:39", updated_at: "2011-10-03 18:40:39", group_id: nil, uploadable_type: nil, uploadable_id: nil, lost: false>
1.9.3-p0 :006 > ul.lost = true
=> true
1.9.3-p0 :007 > ul.save
(0.2ms) BEGIN
(0.1ms) ROLLBACK
=> false
1.9.3-p0 :008 >
.span-2 &nbsp;
.span-20
#gallery
= image_tag 'rails.png'
= image_tag 'david_logo.png'
:javascript
Galleria.loadTheme("#{root_path}/public/themes/classic/galleria.classic.min.js");
$("#gallery").galleria({
width: 500,
2686 dan 20 0 170m 48m 1388 D 0 19.8 0:01.83 ruby
2708 dan 20 0 170m 47m 1388 D 0 19.6 0:01.85 ruby
2715 dan 20 0 170m 47m 1388 D 0 19.4 0:01.81 ruby
2701 dan 20 0 170m 47m 1388 D 0 19.3 0:01.83 ruby
2722 dan 20 0 170m 47m 1380 D 0 19.2 0:01.81 ruby
2694 dan 20 0 169m 21m 1136 D 0 8.6 0:01.54 ruby
2584 dan 20 0 157m 3496 140 S 0 1.4 0:11.37 ruby
<VirtualHost *:80>
ServerName 50.56.125.25
DocumentRoot /home/dan/family-legal-resources/live/public
<Directory /home/dan/family-legal-resources/live/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
= form_for @user_comment do |f|
-if @user_comment.errors.any?
#error_explanation
%h2= "#{pluralize(@user_comment.errors.count, "error")} prohibited this user_comment from being saved:"
%ul
- @user_comment.errors.full_messages.each do |msg|
%li= msg
.field
= f.hidden_field :admin_id, :value => current_admin.id
$ bundle install --verbose
Fetching source index for http://rubygems.org/
^C
Quitting...
/Users/dankest/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.14/lib/bundler/resolver.rb:39:in `block in initialize'
/Users/dankest/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.14/lib/bundler/resolver.rb:38:in `each'
/Users/dankest/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.14/lib/bundler/resolver.rb:38:in `initialize'
/Users/dankest/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.14/lib/bundler/resolver.rb:376:in `new'
/Users/dankest/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.14/lib/bundler/resolver.rb:376:in `block in search'
/Users/dankest/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.14/lib/bundler/resolver.rb:376:in `map'
defaults: &defaults
adapter: 'mysql2'
username: 'root'
password: 'abs123'
host: 'localhost'
development:
<<: *defaults
database: 'merchant_world_dev'
!!! Strict
%html
%head
= render "shared/head"
//%link{ :href => "http://fonts.googleapis.com/css?family=Arvo", :rel => "stylesheet", :type => "text/css" }
//%meta{ :"http-equiv" => "Content-Type", :content => "text/html", :charset => "utf-8" }
%body
#container_inner
!!! Strict
%html
%head
= render "shared/head"
//%link{ :href => "http://fonts.googleapis.com/css?family=Arvo", :rel => "stylesheet", :type => "text/css" }
//%meta{ :"http-equiv" => "Content-Type", :content => "text/html", :charset => "utf-8" }
%body
#container_inner