Skip to content

Instantly share code, notes, and snippets.

View aderyabin's full-sized avatar
👨‍💻
building something new

Andrey Deryabin aderyabin

👨‍💻
building something new
View GitHub Profile
#
# Returns outer (inner + element itself) HTML code of element.
#
# @example
# browser.div(:id => "foo").html
# #=> "<div id=\"foo\"><a>Click</a></div>"
#
# @return [String]
#
def outer_html
# I'm running OS X and I need to develop and test Vagrant features
# which are specific to Linux-only, i.e. I need "physical" Linux machine.
# I've finally stuck with creating DigitalOcean VM and installing
# everything necessary for development there. It's magical
# Vagrant-powered Vagrant-development Vagrantfile.
#
# First, start the VM which will be the host:
# $ vagrant up host --provider=digital_ocean
#
# Now, you can start VM in VM which will be used for Vagrant testing:
@aderyabin
aderyabin / condition.md
Created September 24, 2014 15:03
Конкурс от RubyNonamePodcast И Evil Martians

Условия

Участники конкурса присылают свои open source работы за сентябрь (и оставшуюся до подведения итогов конкурса часть октября) нам в редакцию. Нужно прислать ссылки на свои коммиты или pull requestы, желательно с описанием или со ссылкой на статью в блоге с описанием — нам в комментарий к Gist и по почте info@rubynoname.ru. В письме не забудьте указать, как быстрее всего с вами связаться (почта и телефон, например).

Мы рассматриваем работы на Ruby (улучшения/патчи/PR в Rails, популярные гемы, или ваши собственные новые проекты) и работы по фронтенд-части (тут спектр уже — нас интересуют только улучшения PostCSS, а еще лучше — собственные разработки на базе PostCSS; про него слушайте в подкасте).

Единственный победитель будет выбран ведущими подкаста и брейнвошингов. Крайний срок подачи работ — 6 октября 2014 года (чтобы вы за неделю до первого брейнвошинга еще успели спланировать время и попасть на курс). Победитель может выбрать один из брейнвошингов для бесплатного

{
"bold_folder_labels": true,
"caret_style": "smooth",
"close_windows_when_empty": true,
"color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme",
"create_window_at_startup": false,
"default_line_ending": "unix",
"detect_slow_plugins": false,
"drag_text": false,
"draw_minimap_border": true,

rails/rails

  • gazay - 4 commits
  • igas - 20 commits

rubygems

  • igas - 24 commits
[
{
"description": "Evaluating get.",
"duration(ms)": 3.182579,
"sub_tasks": [
{
"description": "Evaluating table.",
"duration(ms)": 0.060452,
"sub_tasks": [
{
@aderyabin
aderyabin / README.md
Last active August 29, 2015 14:18 — forked from mbostock/.block

This histogram shows the distribution of GitHub Gist API response times (in milliseconds) for a sample of 10,000 requests as observed by bl.ocks.org.

The distribution roughly follows a log-normal distribution, which is unsurprising for a complex process that has multiple independently-random sources of delay. The mode response time was in the range 120-140ms, while the median response time was 206ms. The middle 80% of requests were in the range 114-527ms. About 11% of requests took longer than 500ms, and 5% of requests took longer than one second. (The rightmost bin in the histogram includes these long requests.)

Since API endpoints vary dramatically in their computational cost, the distribution of response times is likely multimodal. In this dataset, 96% of requests were for a single gist (/gists/42), while the remaining 4% of requests were to list a user’s gist (/users/fred/gists). By separating the API requests for a single

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aderyabin
aderyabin / gist:335138
Created March 17, 2010 11:27
generate random sequence
# generate random sequence
#SecureRandom also has methods for: base64, hex, bytes, random_number
#see: http://api.rubyonrails.org/classes/ActiveSupport/SecureRandom.html
require 'active_support/secure_random'
ActiveSupport::SecureRandom.hex(16)
# outputs: 6dc19d21e958e04645cddadb96e9c927
@aderyabin
aderyabin / gitignore
Created March 24, 2010 04:48
.gitignore
log/*.log
.DS_Store
public/cache/**/*
public/system/**/*
config/database.yml
config/*.sphinx.conf
config/s3_credentials.yml
*~
*.cache
*.pid