This file contains hidden or 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
| require "interface" | |
| Strategy = interface { | |
| required_methods :use | |
| } | |
| class StrategyOne | |
| implements Strategy | |
| def use |
This file contains hidden or 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
| require 'minitest/mock' | |
| require 'minitest/unit' | |
| require 'date' | |
| MiniTest::Unit.autorun | |
| class TestMailPurge < MiniTest::Unit::TestCase | |
| class MailPurge | |
| def initialize(imap) | |
| @imap = imap |
This file contains hidden or 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
| # Automatically precompile assets | |
| load "deploy/assets" | |
| # Execute "bundle install" after deploy, but only when really needed | |
| require "bundler/capistrano" | |
| # RVM integration | |
| require "rvm/capistrano" | |
| set :application, "app name" | |
| set :rails_env, :production |
This file contains hidden or 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
| def generate(cardinality=1, result=[1]) | |
| if cardinality == 0 | |
| return result | |
| else | |
| elem = result.last | |
| sub_ary = elem.to_s.split('').map(&:to_i) | |
| result << group(sub_ary) | |
| generate(cardinality - 1, result) | |
| end | |
| end |
This file contains hidden or 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
| require 'pry-debugger' | |
| output = File.new("output.txt", 'a') | |
| nm1 = File.open("names.txt", 'r') | |
| nm2 = File.open("names2.txt", "r") | |
| #binding.pry | |
| nm1.each_line do |n1| | |
| nm2.each_line do |n2| |
This file contains hidden or 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
| Started GET "/instagram_media/download?instagram_photo_ids%5B%5D=694134176098273770_1212139849&instagram_photo_ids%5B%5D=694134083865528807_1212139849&upload_to=poll&album_id=" for 127.0.0.1 at 2014-04-09 18:51:54 +0400 | |
| Processing by InstagramMediaController#download as */* | |
| Parameters: {"instagram_photo_ids"=>["694134176098273770_1212139849", "694134083865528807_1212139849"], "upload_to"=>"poll", "album_id"=>"", "subdomain"=>""} | |
| User Load (2.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
| (2.4ms) SELECT COUNT(*) FROM "user_authorizations" WHERE "user_authorizations"."user_id" = 1 AND "user_authorizations"."provider" = 'instagram' | |
| User::Authorization Load (4.3ms) SELECT "user_authorizations".* FROM "user_authorizations" WHERE "user_authorizations"."user_id" = 1 AND "user_authorizations"."provider" = 'instagram' LIMIT 1 | |
| (1.9ms) BEGIN | |
| SQL (2.5ms) INSERT INTO "poll_tmp_images" ("client_id", "created_at", "image", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["client_ |
This file contains hidden or 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(){ | |
| var tmp_poll_images_ids = '#{@tmp_poll_images_ids}'; | |
| $.get( | |
| '#{new_poll_path}', | |
| { | |
| tmp_poll_images_ids : tmp_poll_images_ids | |
| }).done(function(data){$.fancybox.close();}); | |
| }) |
This file contains hidden or 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
| bool | |
| string | |
| int int8 int16 int32 int64 | |
| uint uint8 uint16 uint32 uint64 uintptr | |
| byte // alias for uint8 | |
| rune // alias for int32 |
This file contains hidden or 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
| var gulp = require('gulp'), | |
| connect = require('connect'), | |
| http = require('http'), | |
| opn = require('opn'), | |
| rimraf = require('rimraf'), | |
| jshint = require('gulp-jshint'), | |
| uglify = require('gulp-uglify'), | |
| sass = require('gulp-sass'), | |
| cssbeautify = require('gulp-cssbeautify'), | |
| minifycss = require('gulp-minify-css'), |
This file contains hidden or 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
| Понимаете принципы построения распределенных систем. | |
| Понимаете JMM (java memory model). | |
| Имеете опыт работы с akka. | |
| Имеете опыт построения систем со сложной бизнес-логикой. | |
| Знаете PostgreSQL. | |
| Знаете принципы ООП, SOLID, Event-driven programming. | |
| Ваш уровень знания Scala A2/L1. |