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
    
  
  
    
  | /* | |
| * Create an event emitter that goes like this | |
| * emitter = new Emitter(); | |
| * | |
| * Allows you to subscribe to some event | |
| * sub1 = emitter.subscribe('function_name', callback1); | |
| * (you can have multiple callbacks to the same event) | |
| * sub2 = emitter.subscribe('function_name', callback2); | |
| * | |
| * You can emit the event you want with this api | 
  
    
      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
    
  
  
    
  | /* CLEAN UP TWITTER | |
| by @levelsio | |
| use Stylebot Chrome extension to load this by default:; | |
| https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en | |
| */ | |
| /* Removes all borders in layout */ | |
| * { | |
| border:none !important; | |
| } | 
  
    
      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
    
  
  
    
  | heroku pg:backups:capture --app sushi | |
| curl -o latest.dump `heroku pg:backups public-url --app sushi` | |
| curl -o latest.dump `heroku pg:backups:url b001 --app sushi` | |
| pg_restore --verbose --clean --no-acl --no-owner -d <app_name>_development latest.dump | |
| # Restore data from trial server | |
| curl -o latest.dump `heroku pg:backups public-url --app labsmart-trial` | |
| be rake db:drop db:create | |
| pg_restore --verbose --clean --no-acl --no-owner -d azurite_development latest.dump | 
  
    
      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
    
  
  
    
  | # Main reference was lascarides' post at http://stackoverflow.com/questions/14743447/getting-pdf-from-wickedpdf-for-attachment-via-carrierwave | |
| # estimate.rb | |
| # ... | |
| has_attached_file :pdf, | |
| storage: :s3, | |
| s3_credentials: { | |
| access_key_id: ENV['AWS_ACCESS_KEY_ID'], | |
| secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], | |
| bucket: ENV['AWS_BUCKET'] | 
  
    
      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
    
  
  
    
  | [~/src] heroku apps:create dblink-demo | |
| Creating dblink-demo... done, stack is cedar | |
| http://dblink-demo.herokuapp.com/ | git@heroku.com:dblink-demo.git | |
| [~/src] heroku addons:add heroku-postgresql:dev -a dblink-demo | |
| Adding heroku-postgresql:dev on dblink-demo... done, v3 (free) | |
| Attached as HEROKU_POSTGRESQL_IVORY_URL | |
| Database has been created and is available | |
| ! This database is empty. If upgrading, you can transfer | |
| ! data from another database with pgbackups:restore. | |
| Use `heroku addons:docs heroku-postgresql:dev` to view documentation. | 
  
    
      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
    
  
  
    
  | =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |