Some parts taken from: https://gist.github.com/kujohn/7209628
ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.
Create file /etc/pf.anchors/pow
Some parts taken from: https://gist.github.com/kujohn/7209628
ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.
Create file /etc/pf.anchors/pow
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
| function countCSSRules() { | |
| var results = '', | |
| log = ''; | |
| if (!document.styleSheets) { | |
| return; | |
| } | |
| for (var i = 0; i < document.styleSheets.length; i++) { | |
| countSheet(document.styleSheets[i]); | |
| } | |
| function countSheet(sheet) { |
| # Use a prefix for the index names that Tire uses so that the test suite doesn't | |
| # stomp on dev data and you can work on multiple apps with ES, but keep tidy | |
| # unadorned names for production. | |
| unless Rails.env.production? | |
| Tire::Model::Search.index_prefix("#{Rails.application.class.parent_name.downcase}_#{Rails.env}") | |
| end |
| # Allow open-uri to follow unsafe redirects (i.e. https to http). | |
| # Relevant issue: | |
| # http://redmine.ruby-lang.org/issues/3719 | |
| # Source here: | |
| # https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb | |
| module OpenURI | |
| class <<self | |
| alias_method :open_uri_original, :open_uri | |
| alias_method :redirectable_cautious?, :redirectable? |
| class Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |