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
    
  
  
    
  | <?php | |
| class Post extends AppModel { | |
| public $validate = array( | |
| 'title' => array( | |
| 'rule' => 'notEmpty', | |
| 'message' => 'Sorry, we need this one, sucka!' | |
| ), | |
| 'body' => array( | |
| 'rule' => 'notEmpty' | |
| ) | 
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| # Script to build a CSV from redirects stored in mysql DB | |
| db="use rbim3;" | |
| if sources=$(mysql -u root --skip-column-names -e "$db SELECT DISTINCT source from redirects ORDER BY source ASC;") | |
| then | |
| for i in $sources | |
| do | |
| echo ">> Fetching redirects for source '$i'" | |
| src_redirect_sql="$db SELECT source, medium, content, destination, COUNT(destination) as visits from redirects WHERE source='$i' GROUP BY content ORDER BY visits DESC;" | 
  
    
      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
    
  
  
    
  | *** LOCAL GEMS *** | |
| ablerc (0.1.1) | |
| abstract (1.0.0) | |
| actionmailer (3.0.19, 3.0.11) | |
| actionpack (3.0.19, 3.0.11) | |
| activemodel (3.0.19, 3.0.11) | |
| activerecord (3.0.19, 3.0.11) | |
| activeresource (3.0.19, 3.0.11) | |
| activesupport (3.0.19, 3.0.11) | 
  
    
      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 'app' | |
| disable :run | |
| set :root, Pathname(__FILE__).dirname | |
| run Sinatra::Application | 
  
    
      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
    
  
  
    
  | @seo_stuff = SeoSetting.where( '(( controller = ? AND action = ? ) OR path = ? )', params[:controller], params[:action], request.path).limit(1) | |
| if @seo_stuff.any? | |
| @page_title = @seo_stuff.page_title #<-- undefined method `page_title'...but I can see the value in the view | |
| @meta_keywords = @seo_stuff.meta_keywords | |
| @meta_description = @seo_stuff.meta_description | |
| 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
    
  
  
    
  | MySite::Application.configure do | |
| config.cache_classes = true | |
| config.log_level = :error | |
| config.action_controller.perform_caching = true | |
| config.active_support.deprecation = :notify | |
| HOST = 'www.mysite.com' | |
NewerOlder