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
# RVM | |
# Add RVM's lib directory to the load path. | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
# Load RVM's capistrano plugin. | |
require "rvm/capistrano" | |
set :rvm_ruby_string, '1.9.3@rails321' | |
set :rvm_type, :user # Copy the exact line. I really mean :user here | |
set :normalize_asset_timestamps, false # Убирает сёр ошибок со старыми папками жаваскрипта и имаджов | |
#Bundle |
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
# This this replacemnt for default rails field_with_errors for using http://www.yaml.de/docs/index.html#yaml-forms | |
# Add this to ./config/environment.rb file | |
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
if html_tag =~ /<label/ | |
%|<div class="ym-error"><p class="ym-message">#{[instance.error_message].join(', ')}</p>#{html_tag}</div>|.html_safe | |
else | |
%|<div class="ym-error">#{html_tag}</div>|.html_safe | |
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
# /app/helpers/devise_helper.rb | |
module DeviseHelper | |
def devise_error_messages! | |
return '' if resource.errors.empty? | |
messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join | |
sentence = I18n.t('errors.messages.not_saved', | |
count: resource.errors.count, | |
resource: resource.class.model_name.human.downcase) |
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
ymaps.ready() | |
.done(function (ym) { | |
myMap = new ymaps.Map("map", { | |
center: [59.704197, 30.023431], | |
zoom: 13 | |
}); | |
jQuery.getJSON('home/cameras.json', function (json) { | |
var geoObjects = ym.geoQuery(json) |
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
connection = Faraday::Connection.new('http://example.com') do |builder| | |
builder.request :url_encoded # for POST/PUT params | |
builder.adapter :net_http | |
end | |
# same as above, short form: | |
connection = Faraday.new 'http://example.com' | |
# GET | |
connection.get '/posts' |
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
### Keybase proof | |
I hereby claim: | |
* I am webchi on github. | |
* I am icha1 (https://keybase.io/icha1) on keybase. | |
* I have a public key ASDvrm2n5xgzrdM_5QG5jNrsQDO8IdhzohFl1411Ef7rjwo | |
To claim this, I am signing this object: |
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
type Miner { | |
name: String! | |
foundBlocks(limit: Int): [FoundBlock] | |
} |
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
PACKER_LOG=1 packer build ./docker-cri.json | |
2018/10/14 10:46:54 [INFO] Packer version: 1.3.1 | |
2018/10/14 10:46:54 Packer Target OS/Arch: linux amd64 | |
2018/10/14 10:46:54 Built with Go Version: go1.11 | |
2018/10/14 10:46:54 Detected home directory from env var: /home/icha1 | |
2018/10/14 10:46:54 Using internal plugin for openstack | |
2018/10/14 10:46:54 Using internal plugin for vmware-iso | |
2018/10/14 10:46:54 Using internal plugin for alicloud-ecs | |
2018/10/14 10:46:54 Using internal plugin for amazon-ebs | |
2018/10/14 10:46:54 Using internal plugin for hyperv-vmcx |
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
<?xml version="1.0" encoding="utf-8"?> | |
<service> | |
<short>consul</short> | |
<description>Consul makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface. Register external services such as SaaS providers as well.</description> | |
<port protocol="tcp" port="8300"/> | |
<port protocol="tcp" port="8301"/> | |
<port protocol="tcp" port="8302"/> | |
<port protocol="tcp" port="8400"/> | |
<port protocol="tcp" port="8500"/> | |
<port protocol="tcp" port="8600"/> |
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
version: '3.5' | |
networks: | |
plannerix: | |
name: plannerix | |
external: true | |
services: | |
primary: | |
hostname: 'primary' |
OlderNewer