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
Password reset flow* | |
Login Form Page | |
forgot-password -> Forgot Password Page | |
Forgot Password Page | |
Disabled submit button* | |
entering-valid-email -> Green submit button | |
Green submit button | |
submit -> Success - Resend Email Page | |
got-email -> Enter new pasword Page | |
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
const counterIncrement = (collector, char) => { | |
const lastItemIndex = collector.length - 1; | |
if(lastItemIndex === -1) { | |
return [[char, 1]]; | |
} | |
if(collector[lastItemIndex][0] == char) { | |
collector[lastItemIndex][1] += 1 | |
} else { |
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
const f = (wait_count, string) => ( | |
new Promise((res, rej) => (setTimeout(() => res(string), wait_count))) | |
); | |
async function sequence() { | |
const a = await Promise.all([ | |
f(2000, '2000 wait'), | |
f(500, '500 wait'), | |
f(1000, '1000 wait') | |
]); |
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
{ | |
"Title": "Titanic", | |
"Year": "1997", | |
"Rated": "PG-13", | |
"Released": "19 Dec 1997", | |
"Runtime": "194 min", | |
"Genre": "Drama, Romance", | |
"Director": "James Cameron", | |
"Writer": "James Cameron", | |
"Actors": "Leonardo DiCaprio, Kate Winslet, Billy Zane, Kathy Bates", |
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
{:user {:plugins [[lein-cljfmt "0.6.1"]] | |
:dependencies [[lein-light-nrepl "0.3.3"]] | |
:repl-options {:nrepl-middleware [lighttable.nrepl.handler/lighttable-ops]}}} |
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 MiddleRate | |
attr_reader :data | |
def initialize(data) | |
@data = data | |
end | |
def call | |
# age rates got { 18 => [30, 15], 50 => [35] } | |
age_rates = data.each_with_object(memory_hash) do |data_item, acc| |
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
FROM starefossen/ruby-node:2-8 | |
LABEL maintainer="Lisovskii Vladislav (a@a.de)" | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev | |
ENV APP_HOME /sw-app | |
RUN mkdir $APP_HOME | |
WORKDIR $APP_HOME |
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
[0KRunning with gitlab-ci-multi-runner 9.5.1 (96b34cc) | |
on ci_runner_02 (bcf9d6e9) | |
[0;m[0KUsing Docker executor with image ruby:2.4.3 ... | |
[0;m[0KStarting service postgres:latest ... | |
[0;m[0KPulling docker image postgres:latest ... | |
[0;m[0KUsing docker image postgres:latest ID=sha256:ec61d13c85666651ff092b89d46ae958d81c7f3d387ed91ae5c530a38b9896e2 for postgres service... | |
[0;m[0KWaiting for services to be up and running... | |
[0;m[0KUsing docker image sha256:b8b3cb280f3e2b76afb91d3c7c3227bac6de27e9f27e7ace2d9dd533b9c92309 for predefined container... | |
[0;m[0KPulling docker image ruby:2.4.3 ... | |
[0;m[0KUsing docker image ruby:2.4.3 ID=sha256:713da53688a6446953cb7c0260d03a65a115cb60b727a890142628a4622642c7 for build container... |
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
image: ruby:2.4.3 | |
stages: | |
- test | |
services: | |
- postgres:latest | |
variables: | |
POSTGRES_DB: sw-test-db |
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 Trie | |
Node = Struct.new(:char, :children, :is_complete_word) | |
attr_reader :root | |
def initialize | |
@root = Node.new('', {}, false) | |
end | |
def add_word(word) |
NewerOlder