:%s/:\([^ ]*\)\(\s*\)=>/\1:/g
This file contains 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
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
# Wrappers are used by the form builder to generate a | |
# complete input. You can remove any component from the | |
# wrapper, change the order or even add your own to the | |
# stack. The options given below are used to wrap the | |
# whole input. | |
config.wrappers :default, class: :input, hint_class: :field_with_hint, error_class: :field_with_errors do |b| | |
## Extensions enabled by default | |
# Any of these extensions can be disabled for a |
There are a few simple libraries to make Angular work with Sweetalert. If you really want to check them out:
Unfortunately, they wern't that "Sweet". The idea is to not use libraries to use other libraries.
This file contains 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
Capybara.register_driver :chrome do |app| | |
# optional | |
client = Selenium::WebDriver::Remote::Http::Default.new | |
# optional | |
client.timeout = 120 | |
Capybara::Selenium::Driver.new(app, :browser => :chrome, :http_client => client) | |
end | |
Capybara.javascript_driver = :chrome |
This file contains 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
# say you want to know the source location of a method :hai on the object O | |
# you can do | |
# a method in ruby is also an object. This returns the method object for method :hai | |
m = O.method(:hai) | |
# this will give you the exact location of the me | |
m.source_location |
If you haven't already installed postgres, you can follow the instructions here.
Go ahead, and run this in your terminal:
sudo apt-get install postgresql-9.3-postgis-2.1 pgadmin3 postgresql-contrib
Enable Adminpack in postgres
sudo -u postgres psql
NewerOlder