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
ArgumentError: wrong number of arguments (4 for 0..2) | |
... 82 non-project frames | |
1 | |
File "/path/to/shared/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/core.rb" line 170 in initialize | |
2 | |
File "/path/to/shared/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/inheritance.rb" line 27 in new | |
3 | |
File "/path/to/shared/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/inheritance.rb" line 27 in new | |
4 | |
File "/path/to/shared/bundle/ruby/2.0.0/gems/inherited_resources-1.3.1/lib/inherited_resources/base_helpers.rb" line 52 in build_resource |
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
Show hidden characters
[ | |
{ "keys": ["super+ctrl+r"], "command": "reveal_in_side_bar" }, | |
{ | |
"command": "navigate_to_definition", | |
"keys": [ | |
"super+alt+]" | |
] | |
}, | |
{ | |
"command": "jump_back", |
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
{% if 'now' | date: "%w" == 0 or 'now' | date: "%w" == 6 %} | |
сегодня выходной | |
{% if 'now' | date: "%H" > 10 or 'now' | date: "%H" < 21 %} | |
Если выходные время с 11 до 21, то "текст 3" | |
{% else %} | |
Если выходные и время с 21 до 11, то текст 4 | |
{% endif %} | |
{% else %} | |
сегодня будний день | |
{% if 'now' | date: "%H" > 8 or 'now' | date: "%H" < 21 %} |
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
Получатель (ФИО): {{ order.shipping_address.name | escape }}{% if order.shipping_address.middlename.size > 0 %} {{ order.shipping_address.middlename | escape }}{% endif %} {{ order.shipping_address.surname | escape }} | |
Контактный телефон: {{ order.shipping_address.phone | escape }} | |
Способ доставки: {{ order.delivery_title }} | |
Область: {{ order.shipping_address.state | escape }} | |
Город: {{ order.shipping_address.city | escape }} | |
Адрес доставки: {{ order.shipping_address.address | escape }} | |
{% if order.shipping_address.zip %} | |
Индекс: {{ order.shipping_address.zip | escape }} | |
{% endif %} | |
Условия доставки: {{ order.delivery_description }} |
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
apps@p2:~$ ls -la /home/apps/.ssh/ | |
total 24 | |
drwx------ 2 apps apps 4096 May 21 14:09 . | |
drwxr-xr-x 29 apps apps 4096 May 21 14:30 .. | |
-rw------- 1 apps apps 1988 May 21 13:35 authorized_keys | |
-rw------- 1 apps apps 1675 May 21 14:09 id_rsa | |
-rw------- 1 apps apps 400 May 21 14:09 id_rsa.pub | |
-rw------- 1 apps apps 1595 May 21 14:28 known_hosts | |
apps@p2:~$ cat /etc/ssh/ssh_config |
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
do ($ = jQuery) -> | |
$.fn.extend | |
phoneInput: (options) -> | |
settings = regexp: /^(\+7|8)\d{0,10}$/ | |
settings = $.extend settings, options | |
getChar = (event) -> | |
if event.which == null # IE | |
return null if event.keyCode < 32 # Special chars | |
return String.fromCharCode event.keyCode |
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
#!/bin/sh | |
NEW_DATE="Mon Nov 7 01:17:21 2011 +0400" | |
COMMIT_HASH="cb00205ac75ae374a79cfaa0de9ce2048745634e" | |
git filter-branch -f --env-filter \ | |
'if [ $GIT_COMMIT = $COMMIT_HASH ] | |
then | |
export GIT_AUTHOR_DATE=$NEW_DATE | |
export GIT_COMMITTER_DATE=$NEW_DATE | |
fi' |
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
.DS_Store | |
.bundle | |
.vagrant | |
/vendor/bundle | |
/db/*.sqlite3 | |
/db/sphinx | |
log/*.log |
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
config.after(:each, js: true) do |example| | |
begin | |
result_filebase = Rails.root.join('tmp', 'screenshots', "#{DateTime.now.to_i}_#{example.description.gsub(%r{[\x00\/\\:\*\?\"<>\|\s]}, '_')}") | |
Capybara.page.save_page("#{result_filebase}.html") | |
Capybara.page.save_screenshot("#{result_filebase}.png", full: true) | |
rescue | |
puts 'Capybara driver doesn\'t support screenshot feature' | |
end if example.exception | |
end |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
OlderNewer