terraform -install-autocomplete #Setup tab auto-completion, requires logging back in
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
<template> | |
</template> | |
<script> | |
export default { | |
components: { | |
}, | |
props: [ |
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
#rails <= 5.0 | |
user = User.new(name: "Bob") | |
user.save | |
user.changed_name? #true | |
user.update_attribute(:name, "Alice") | |
user.changed_name? #true | |
#rails >= 5.1 | |
user = User.new(name: "Bob") |
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
#put to lib/i18n_ar_attribute_shower.rb | |
module ActiveModel | |
# == Active \Model \Translation | |
# | |
# Provides integration between your object and the Rails internationalization | |
# (i18n) framework. | |
# | |
# A minimal implementation could be: | |
# |
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
@all_count = 0 | |
list.each { |item| @all_count += item['quantity'] } | |
#short and correctly | |
@all_count = list.map(&:auantity).sum |
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
filters[:departure_date].each do |str_date| | |
if str_date.size == 8 | |
updated_date_filters << Date.strptime(str_date, '%d.%m.%y') | |
else | |
updated_date_filters << str_date | |
end | |
end | |
#short variant | |
filters[:departure_date].map!(|d| d.size == 8 ? Date.strptime(d, '%d.%m.%y') : d) |
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
Error #1034: Type Coercion failed: cannot convert Object@ee052671 to com.raka.mapeditor.model.Area | |
package com.raka.mapeditor.model | |
{ | |
public class Area | |
{ | |
public var id:Number; | |
public var name:String; |