save_and_open_page
have_button(locator)| // | |
| // NSDate+Surrounding.h | |
| // | |
| // Created by Josh Kendall on 12/22/10. | |
| // Copyright 2010 JoshuaKendall.com. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface NSDate (Surrounding) |
| Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
| 1.) Open any application | |
| 2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
| 3.) Release Power button | |
| 4.) Press and hold Home button Lightly | |
| until screen returns to icon screen |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2265392/hack.sh | sh | |
| # |
| A good commit message looks like this: | |
| Header line: explaining the commit in one line | |
| Body of commit message is a few lines of text, explaining things | |
| in more detail, possibly giving some background about the issue | |
| being fixed, etc etc. | |
| The body of the commit message can be several paragraphs, and | |
| please do proper word-wrap and keep columns shorter than about |
| #in config/initializers/wicked_pdf.rb | |
| module WickedPdfHelper | |
| def wicked_pdf_stylesheet_link_tag(*sources) | |
| sources.collect { |source| | |
| "<style type='text/css'>#{Rails.application.assets.find_asset("#{source}.css")}</style>" | |
| }.join("\n").gsub(/url\(['"](.+)['"]\)(.+)/,%[url("#{wicked_pdf_image_location("\\1")}")\\2]).html_safe | |
| end | |
| def wicked_pdf_image_tag(img, options={}) | |
| image_tag wicked_pdf_image_location(img), options |
##Refs
Add to Gemfile: gem 'wicked_pdf'
| # Deploy and rollback script for Heroku on staging and/or production | |
| # Modified from: https://gist.github.com/njvitto/362873 | |
| namespace :deploy do | |
| PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
| STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
| desc 'Deploy to Staging on Heroku' | |
| task :staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| desc 'Deploy to Production on Heroku' |