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
/* this selects every p tag and makes them all 600px wide and have a margin of 20px */ | |
p { | |
width: 600px; | |
margin: 20px; | |
} | |
/* the hash symbol looks for a tag with an id="intro" in your HTML, this gives it a width of 300px and a background color red */ | |
#intro { |
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
# So this is in control_word.rb | |
class ControlWord < ActiveRecord::Base | |
def self.exists?(word) | |
find_by_text(word) | |
end | |
def self.positive? | |
self.status == "positive" |
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
control_words = ControlWord.create([ | |
{:text => 'death', :status => 'negative'}, | |
{:text => 'murder', :status => 'negative'}, | |
{:text => 'war', :status => 'negative'}, | |
{:text => 'dead', :status => 'negative'}, | |
{:text => 'crisis', :status => 'negative'}, | |
{:text => 'threat', :status => 'negative'}, | |
{:text => 'bomb', :status => 'negative'}, | |
{:text => 'killed', :status => 'negative'}, | |
{:text => 'protest', :status => 'negative'}, |
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
@words = [] | |
@words = entry.title.scan(/\w+/) | |
@words.each do |word| | |
if word = ControlWord.exists?(word) | |
if ControlWord.new.positive? | |
debugger | |
update_attributes(:pos += 1) | |
else | |
update_attributes(:pos += 1) | |
end |
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
@negentries = FeedEntry.where(:status => 'negative').where("created_at >= #{Time.zone.now.beginning_of_day.to_s(:db)}") |
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
<% unless params[:action] == "checkout" && params[:controller] == "cart" %> | |
<%= render :partial => 'navigation'%> | |
<% end %> |
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
#nav { | |
#navbar { | |
ul { | |
li.active { | |
a.nav-2 { | |
&:hover { | |
} | |
} |
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
rvm install 1.9.2 | |
gem install bundler | |
gem install rails | |
bundle install |
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
Installing rmagick (2.13.1) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/Tommy/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb | |
checking for Ruby version >= 1.8.5... yes | |
checking for clang... yes | |
checking for Magick-config... yes | |
checking for ImageMagick version >= 6.4.9... yes | |
checking for HDRI disabled version of ImageMagick... yes | |
checking for stdint.h... *** extconf.rb failed *** |
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
HOMEBREW_VERSION: 0.8 | |
HEAD: c65b3511fb664081de252779de096147aed7fcfb | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
HOMEBREW_REPOSITORY: /usr/local | |
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew | |
Hardware: dual-core 64-bit penryn | |
OS X: 10.7.2 | |
Kernel Architecture: x86_64 | |
Ruby: 1.8.7-249 |
OlderNewer