Joined December 2013
·
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,395 Total ProTip Views

24PullRequests Continuous Syncs
Sent at least 24 pull requests during the first 24 days of December 2014

24PullRequests Participant
Sent at least one pull request during the first 24 days of December 2014

Kona
Have at least one original repo where CoffeeScript is the dominant language

Nephila Komaci
Have at least one original repos where PHP is the dominant language

Altruist
Increase developer well-being by sharing at least 20 open source projects

Bear 3
Have at least three original repos where Objective-C is the dominant language

Bear
Have at least one original repo where Objective-C is the dominant language

T-Rex
Have at least one original repo where C is the dominant language

Komodo Dragon
Have at least one original repo where Java is the dominant language

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos

Forked
Have a project valued enough to be forked by someone else

Mongoose 3
Have at least three original repos where Ruby is the dominant language

Mongoose
Have at least one original repo where Ruby is the dominant language

Cub
Have at least one original jQuery or Prototype open source repo

Epidexipteryx 3
Have at least three original repo where C++ is the dominant language

Epidexipteryx
Have at least one original repo where C++ is the dominant language

24PullRequests Continuous Syncs
Sent at least 24 pull requests during the first 24 days of December 2013

24PullRequests Participant
Sent at least one pull request during the first 24 days of December 2013

Charity
Fork and commit to someone's open source project in need
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: