Skip to content

Instantly share code, notes, and snippets.

View FernE97's full-sized avatar

Eric Fernandez FernE97

View GitHub Profile
@thewatts
thewatts / mamp-virtualhosts.md
Last active September 4, 2018 20:40
This is a quick gist for setting up simple Virtual Hosts with MAMP

Setting Up MAMP to have Virtual Hosts.

  • This will work with MAMP 2.1.1 on OSX Mountain Lion, no guarantee otherwise.
  • Virtual Hosts allow you to use readable URLs in your address bar to point to your local web projects instead of having to type "localhost:8888", etc.

Setting Up Mamp Application

  1. Install MAMP mamp.info
  2. Launch Mamp & click on Preferences
  3. Click the Ports tab and click the Set to default Apache and MySQL ports button.
  • This will set your Apache Port to 80 and your MySQL Port to 3306
  1. Click the Apache tab to setup your Document Root
@kapkaev
kapkaev / gist:4619127
Created January 24, 2013 09:30
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
$ redis-cli
> config set stop-writes-on-bgsave-error no
@Steven-Rose
Steven-Rose / gist:3943830
Created October 24, 2012 04:27
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@dmoulton
dmoulton / autotab.rb
Created May 17, 2012 18:58
Rails helper for tab order in forms
# Should probably go in application_helper
# examples (when run in this order):
# autotab # returns 1
# autotab # returns 2
# autotab(100) # returns 102
# autotab # returns 3
# autotab(100,true) # returns 104
# autotab # returns 105
# example f.text_field :address, :tabindex=>autotab