I hereby claim:
- I am sergey-alekseev on github.
- I am sergeyalekseev (https://keybase.io/sergeyalekseev) on keybase.
- I have a public key whose fingerprint is 2D4B 460A 441B D5A9 F42E 97A9 781C 4863 C8D7 8D81
To claim this, I am signing this object:
{ | |
"ensure_newline_at_eof_on_save": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |
I hereby claim:
To claim this, I am signing this object:
input { | |
# Read all documents from Elasticsearch matching the given query | |
elasticsearch { | |
hosts => "localhost" | |
index => "index_name" | |
query => '{"query":{"regexp":{"not_analyzed_field":".*"}}}' | |
} | |
} | |
output { |
Benchmark.ips do |x| | |
x.report('merge') { {}.merge :a => 1 } | |
x.report('merge!') { {}.merge! :a => 1 } | |
x.compare! | |
end | |
Calculating ------------------------------------- | |
merge 34.220k i/100ms | |
merge! 33.039k i/100ms | |
------------------------------------------------- | |
merge 1.923M (±32.2%) i/s - 7.631M |
# Russian. Updated 2014-04-01 | |
ru: | |
admin: | |
js: | |
true: 'True' | |
false: 'False' | |
is_present: 'Не пустое' | |
is_blank: 'Пустое' | |
date: 'Дата ...' |
=========== [mysql2] Single column with unique index (1000 records) ============ | |
Warming up -------------------------------------- | |
validate_only_if_changed_by_default = true | |
2.014k i/100ms | |
validate_only_if_changed_by_default = false | |
227.000 i/100ms | |
Calculating ------------------------------------- | |
validate_only_if_changed_by_default = true | |
21.060k (± 3.1%) i/s - 106.742k in 5.073537s |
# this is a simple Ruby script written by https://github.com/sergey-alekseev | |
# to automate dummy "UP"s for adverts on the most popular local Belarusian | |
# online flea market – http://baraholka.onliner.by | |
# feel free to create a recurring task from the script | |
# using launchd on Mac or cron on Linux | |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails", github: "rails/rails" |
# See http://twitter.github.com/bootstrap/components.html#alerts | |
# | |
# USAGE: | |
# flash.now[:info] = { title: 'New flash messages! ', body: 'Just add :info, :success, :warning or :error.' } | |
# redirect_to root_path, warning: 'You should use :success and :error instead of :notice and :alert' | |
# | |
# in application_controller.rb | |
def pretty_flash(name, msg) | |
msg_content = if msg.is_a?(String) |
# ERB: | |
# | |
# <%= google_analytics 'UA-XXXXXXXX-X' %> | |
# </head> | |
# | |
# Haml: | |
# | |
# = google_analytics('UA-XXXXXXXX-X') | |
# %body | |