###Step 1: Install XCode
Check if the full Xcode package is already installed:
$ xcode-select -p
If you see:
/Applications/Xcode.app/Contents/Developer
| " PLUGINS | |
| " vim-rails | |
| " grep.vim | |
| " nerdcommenter | |
| " nerdtree | |
| " snipmate.vim | |
| " vim-fugitive | |
| " vim-fuzzyfinder-pathogen | |
| " vim-ragtag | |
| " vim-surround |
| var toast=function(msg){ | |
| $("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h3>"+msg+"</h3></div>") | |
| .css({ display: "block", | |
| opacity: 0.90, | |
| position: "fixed", | |
| padding: "7px", | |
| "text-align": "center", | |
| width: "270px", | |
| left: ($(window).width() - 284)/2, | |
| top: $(window).height()/2 }) |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
###Step 1: Install XCode
Check if the full Xcode package is already installed:
$ xcode-select -p
If you see:
/Applications/Xcode.app/Contents/Developer
###Step 1: Install XCode
Check if the full Xcode package is already installed:
$ xcode-select -p
If you see:
/Applications/Xcode.app/Contents/Developer
| $ brew uninstall postgresql | |
| $ gem uninstall pg # ALL OF THEM | |
| $ rm -fr /usr/local/var/postgres | |
| $ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| $ pg_ctl -D /usr/local/var/postgres stop -s -m fast # WE SHOULD HAVE ALL postgres SERVERS & PROCESSES STOPPED BY NOW | |
| $ brew install postgres | |
| $ env ARCHFLAGS="-arch x86_64" gem install pg | |
| $ echo "DONE." >> /dev/null | |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
You can't just follow the directions on the site, you have to do some mojo first.
sudo apt-get update
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for you:
| // Implementation in ES6 | |
| function pagination(c, m) { | |
| var current = c, | |
| last = m, | |
| delta = 2, | |
| left = current - delta, | |
| right = current + delta + 1, | |
| range = [], | |
| rangeWithDots = [], | |
| l; |