Joined December 2013
·

Adrian

Disruptive Angels
·
México
·
·
·

You can rewrite the error method like this :)
ruby def error(e) # render :template => "#{Rails::root}/public/404.html" return raise e unless env['ORIGINAL_FULLPATH'] =~ %r{^/v\d/} error_info = { error: 'internal-server-error', exception: "#{e.class.name} : #{e.message}" } error_info[:trace] = e.backtrace[0, 10] if Rails.env.development? render json: error_info.to_json, status: 500 end
As you can see it avoids the use of an if else making its execution a bit faster :+1:

Posted to .htaccess hacks over 1 year ago

Use this

Options +FollowSymLinks
DirectoryIndex index.php

RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.php HTTP/
RewriteRule ^index.php$ http://www.askapache.com/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Posted to OSX Influenced bash aliases over 1 year ago

alias cleardns="sudo killall -HUP mDNSResponder"

Posted to Alias for $git push -u over 1 year ago

I prefer just psh faster :)

Achievements
216 Karma
2,314 Total ProTip Views