Rails flash messages with AJAX requests
  
    
      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
    
  
  
    
  | # Step 1: setup the initial sync | |
| svnsync init DETINATION_REPO SOURCE_REPO --source-username sousername --sync-username syusername | |
| #Step 2: Issue the sync command | |
| svnsync sync DETINATION_REPO | 
  
    
      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
    
  
  
    
  | ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe | |
| # add nokogiri gem to Gemfile | |
| elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css "label, input" | |
| elements.each do |e| | |
| if e.node_name.eql? 'label' | |
| html = %(<div class="clearfix error">#{e}</div>).html_safe | |
| elsif e.node_name.eql? 'input' | |
| if instance.error_message.kind_of?(Array) | |
| html = %(<div class="clearfix error">#{html_tag}<span class="help-inline"> #{instance.error_message.join(',')}</span></div>).html_safe | 
  
    
      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
    
  
  
    
  | UICollectionViewCell* collectionViewCell = [self.collectionView cellForItemAtIndexPath:indexPath]; | |
| collectionViewCell.layer.masksToBounds = NO; | |
| collectionViewCell.layer.cornerRadius = 8; // rounded corners | |
| CGColorRef redColor = [UIColor colorWithRed:1.0 green:0.0 | |
| blue:0.0 alpha:1.0].CGColor; | |
| collectionViewCell.layer.shadowColor = redColor; | |
| collectionViewCell.layer.shadowOffset = CGSizeMake(-15, 20); | |
| collectionViewCell.layer.shadowRadius = 5; | |
| collectionViewCell.layer.shadowOpacity = 0.5; | |
| collectionViewCell.layer.shadowOffset = CGSizeMake(10,10); | 
  
    
      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
    
  
  
    
  | // LocationServices.h | |
| #import <Foundation/Foundation.h> | |
| #import <CoreLocation/CoreLocation.h> | |
| @interface LocationServices : NSObject <CLLocationManagerDelegate> { | |
| CLLocationManager *locationManager; | |
| CLLocation *currentLocation; | |
  
    
      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
    
  
  
    
  | <snippet> | |
| <content><![CDATA[ | |
| <!doctype html> | |
| <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
| <head> | |
| <meta charset="utf-8"> | 
  
    
      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 'rvm/capistrano' | |
| require 'bundler/capistrano' | |
| default_run_options[:pty] = true # Must be set for the password prompt | |
| # from git to work | |
| set :rvm_type, :system | |
| set :rails_env, 'development' | |
| set :user, 'lamguy' | 
- Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
From here on out, use Package Control to install everything. ⌘+Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.
OlderNewer