heroku addons:add heroku-postgresql:standard-0 --remote staging
heroku maintenance:on --remote staging
heroku ps:scale worker=0 --remote staging
heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_PINK --remote staging
heroku pg:promote HEROKU_POSTGRESQL_PINK --remote staging
heroku ps:scale worker=1 --remote staging
heroku maintenance:off --remote staging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new | |
| Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
| ga('create', 'UA-1420780-22', 'auto'); | |
| ga('send', 'pageview'); | |
| </script> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is copied to spec/ when you run 'rails generate rspec:install' | |
| ENV['RAILS_ENV'] ||= 'test' | |
| require File.expand_path('../../config/environment', __FILE__) | |
| require 'rspec/rails' | |
| #require 'spec_helper' | |
| require 'capybara/rspec' | |
| require 'capybara/rails' | |
| require 'capybara/poltergeist' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This gist is the update of this post https://u.osu.edu/hasnan.1/2014/03/30/rails-4-multiple-file-upload-with-carrierwave-nested-form-and-jquery-file-upload/ | |
| License MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function RemoveAccents(strAccents) { | |
| var strAccents = strAccents.split(''); | |
| var strAccentsOut = new Array(); | |
| var strAccentsLen = strAccents.length; | |
| var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž'; | |
| var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz"; | |
| for (var y = 0; y < strAccentsLen; y++) { | |
| if (accents.indexOf(strAccents[y]) != -1) { | |
| strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1); | |
| } else |
As configured in my dotfiles.
start new:
tmux
start new with session name:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="authform"> | |
| <h3>Editar cuenta</h3> | |
| <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :role => 'form'}) do |f| %> | |
| <%= devise_error_messages! %> | |
| <div class="form-group"> | |
| <%= f.label :firstname %> | |
| <%= f.text_field :firstname, :autofocus => true, class: 'form-control' %> | |
| </div> | |
| <div class="form-group"> | |
| <%= f.label :email %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop |