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
ru: | |
helpers: | |
page_entries_info: | |
more_pages: | |
display_entries: "Показана %{entry_name} <b>%{first} - %{last}</b> из <b>%{total}</b>" | |
one_page: | |
display_entries: | |
few: "Показаны <b>%{count}</b> %{entry_name}" | |
many: "Показаны <b>%{count}</b> %{entry_name}" | |
one: "Показано <b>%{count}</b> %{entry_name}" |
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
# Load DSL and set up stages | |
require 'capistrano/setup' | |
# Include default deployment tasks | |
require 'capistrano/deploy' | |
require 'capistrano/unicorn_nginx' | |
require 'rvm1/capistrano3' | |
require 'capistrano/bundler' | |
require 'capistrano/rails/assets' | |
require 'capistrano/rails/migrations' |
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
server { | |
listen 80; | |
server_name www.servername.com; | |
location / { | |
proxy_pass http://localhost:3000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; |
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
form do |f| | |
f.has_many :images, allow_destroy: true, new_record: true do |fi| | |
fi.input :file, as: :file, hint: (f.template.image_tag(f.object.file.url(:small)) if f.object.file.present?) | |
end | |
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
class Array | |
# [1, 2, 3, 4, 5, 6, 7, 8].to_columns 1, 2, 3, 2 => [[1], [2, 3], [4, 5, 6], [7, 8]] | |
def to_columns *column_counts | |
return [] if self.empty? | |
result, start_iterator, end_iterator = [], 0, 0 | |
column_counts.each do |column_count| | |
end_iterator = start_iterator + column_count | |
cut = self[start_iterator...end_iterator] | |
result << cut unless cut.nil? | |
start_iterator += column_count |
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
alias s="git status" | |
alias a="git add" | |
alias c="git commit -m" | |
alias p="git push origin" | |
alias pu="git pull origin" | |
alias ch="git checkout" | |
alias cb="git checkout -b" | |
alias cl="git clone" | |
alias di="git diff" | |
alias am="git commit --amend" |
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
function SocketIO(url) { | |
this.socket = new WebSocket(url); | |
this.actions = {}; | |
var self = this; | |
this.socket.onmessage = function(event) { | |
var name, message; | |
[name, message] = self.parse_data(event.data); | |
self.actions[name](message) | |
} |
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
service nginx start | |
thin start -s 2 -C /etc/thin/myapp.yml -R config.ru | |
thin restart -C /etc/thin/myapp.yaml |
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
upstream uphill_rating { | |
server 127.0.0.1:4000; | |
} | |
server{ | |
listen 80; | |
server_name uphill.krylov-alexey.ru; | |
location / { | |
try_files $uri @proxy; | |
} |
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
aws s3 sync s3://production… /tmp/s3/ --profile production | |
aws s3 sync /tmp/s3/ s3://boss-strapping-stage/ --profile stage --acl public-read |
OlderNewer