wget https://gist.githubusercontent.com/reabiliti/92e2533335e784099e5bdc39d48fbb46/raw/ff10e54f562c83672f0b1958a144c4b72c070158/install-selenium.sh
chmod +x install-selenium.sh
./install-selenium.sh
wget https://gist.githubusercontent.com/reabiliti/92e2533335e784099e5bdc39d48fbb46/raw/ada2df9aa38a825e8e3058ec49708444c5a04510/start-chrome.sh
chmod +x start-chrome.sh
./start-chrome.sh
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
# frozen_string_literal: true | |
RSpec::Matchers.define(:deep_include) do |expected| | |
# Found there https://gist.github.com/mltsy/21fd5e15ae12a004c8b13d6ec4534458 and added some changes | |
# For example we have some spec: | |
# expect(query_result).to deep_include( | |
# tickets: { | |
# edges: [ | |
# { | |
# node: { |
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
String.prototype.toCamel = function(){ | |
return this.replace(/([-_][a-z])/g, function($1){return $1.toUpperCase().replace(/[-_]/,'');}); | |
}; | |
String.prototype.trim = function(){ | |
return this.replace(/^\s+|\s+$/g, ""); | |
}; | |
String.prototype.toDash = function(){ |
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
# These are all the cops that are enabled in the default configuration. | |
require: | |
- rubocop-rails | |
- rubocop-performance | |
- rubocop-rspec | |
AllCops: | |
NewCops: enable |
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
Show hidden characters
{ | |
"env": { | |
"es6": true | |
}, | |
"extends": "airbnb", | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion": 2018, | |
"ecmaFeatures": { | |
"jsx": true |
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
// Add a 401 response interceptor | |
window.axios.interceptors.response.use(function (response) { | |
return response; | |
}, function (error) { | |
if (401 === error.response.status) { | |
swal({ | |
title: "Session Expired", | |
text: "Your session has expired. Would you like to be redirected to the login page?", | |
type: "warning", | |
showCancelButton: true, |
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
Алгоритмы: | |
1) Стивен Скиена "Алгоритмы. Руководство по разработке" | |
2) Томас Кормен "Алгоритмы. Построение и анализ" | |
3) Дональд Кнут "Искусство программирования" (никто в реальности не читал этот многотомный труд целиком, но в любой подборке по алгоритмам он обязан быть) | |
Общее: | |
1) Род Хаггарти "Дискретная математика для программистов" | |
2) Керниган, Ритчи "Язык программирования С" - для общего понимания принципов программирования | |
3) Дж. Андресон "Дискретная математика и комбинаторика" | |
4) Романовский И.В. "Дискретный анализ" |
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
## | |
# by SoAwesomeMan | |
str =<<-EOS.gsub(/^[\s\t]*|[\s\t]*\n/, '') # no space "\s" for new line "\n"; kill tabs too | |
select awesome, awesome, awesome, awesome, awesome, awesome, | |
from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, | |
where cool cool cool cool cool cool cool cool cool cool cool' | |
EOS | |
# => "select awesome, awesome, awesome, awesome, awesome, awesome,from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad,where cool cool cool cool cool cool cool cool cool cool cool'" | |
str =<<-EOS.gsub(/^[\s\t]*/, '').gsub(/[\s\t]*\n/, ' ').strip # yes space "\s" for new line "\n"; kill tabs too |
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
# | |
# Sidekiq auto start using systemd unit file for Ubuntu 18.04 | |
# | |
# Put this in /lib/systemd/system (Ubuntu). | |
# Run: | |
# 1. systemctl enable sidekiq (to enable sidekiq service) | |
# 2. systemctl {start,stop,restart} sidekiq (to start sidekiq service) | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies | |
# to run multiple processes (sidekiq-1, sidekiq-2, etc). |
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
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted |
NewerOlder