Skip to content

Instantly share code, notes, and snippets.

View sadfuzzy's full-sized avatar
🎯
Focusing

Denis Savitskiy sadfuzzy

🎯
Focusing
View GitHub Profile
@sadfuzzy
sadfuzzy / dashboard.html
Last active June 5, 2019 13:12
Dashboard
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>DASHBOARD</title>
<meta name="description" content="DASHBOARD">
<meta name="author" content="D">
</head>
config.log_level = :info
config.lograge.enabled = true
config.log_formatter = ::Logger::Formatter.new
config.action_mailer.default_url_options = { host: 'goody.im', protocol: :https }
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
openssl_verify_mode: 'none',
tls: false,
@sadfuzzy
sadfuzzy / cloudSettings
Last active March 27, 2019 09:16
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-03-24T19:37:10.866Z","extensionVersion":"v3.2.7"}
@sadfuzzy
sadfuzzy / test_task.rb
Created March 11, 2019 15:38
test task
class Developer
# You need to implement Developer class so DataBase#find_developer method would not fail.
end
class DataBase
def find_developer(platform: :ruby, region: :london)
all_developers(platform, region).select do |you|
@sadfuzzy
sadfuzzy / test_task.md
Last active February 14, 2019 10:55
Check credit cards

Checking Credit Cards

Write a program that accepts a credit card number as a command-line argument. The program should print the card's type (or Unknown) as well a Valid/Invalid indication of whether or not the card passes the Luhn algorithm. Hint: use git, cover with specs, make some user friendly interface (can be a command line), make it modular.

Before a credit card is submitted to a financial institution, it generally makes sense to run some simple reality checks on the number. The numbers are a good length and it's common to make minor transcription errors when the card is not scanned directly. The first check people often do is to validate that the card matches a known pattern from one of the accepted card providers. Some of these patterns are:

+============+=============+===============+
| Card Type  | Begins With | Number Length |
@sadfuzzy
sadfuzzy / setup.txt
Last active November 2, 2018 20:50
Ubuntu setup
System:
sudo apt-get install software-properties-common ncdu
Git:
sudo apt-get install git git-core
git config --global user.email "sadfuzzy@yandex.ru"
git config --global user.name "Denis Savitskiy"
git config --global push.default simple
https://github.com/settings/ssh
action="https://mycabinet.online/prepare" method="post"
input type="hidden" name="pid" value="#{@nko.pid}"
input type="hidden" name="sid" value="#{@nko.sid}"
input type="hidden" name="oid" value="#{Текущее время, unix формат}"
input type="hidden" name="rid" value="#{@publisher.id}"
input type="hidden" name="backurl" value="https://www.goody.im/pages/thankyou?nko_id=#{@nko.id}&nko_number=#{@nko.number}&orderid=#{orderid}&nko_title=#{@nko.title}&publisher_id=#{@publisher.id}&publisher_title=СуперТаня"
input type="hidden" name="nkoid" value="#{@nko.number}"
input type='text' name='sum' pattern="[0-9]{1,9}"
input type='text' name='payeer' placeholder='Имя' required=true
input type='text' name='email' placeholder='E–mail' required=true pattern=/\S+@\S+\.\S+/

Keybase proof

I hereby claim:

  • I am sadfuzzy on github.
  • I am sadfuzzy (https://keybase.io/sadfuzzy) on keybase.
  • I have a public key ASBZfIRsmYU8jDwYvVOY2ubquZ-TjEWGB1qZ_L4J6l3Ffwo

To claim this, I am signing this object:

@sadfuzzy
sadfuzzy / links.txt
Last active October 23, 2017 20:42
links
@sadfuzzy
sadfuzzy / .rubocop.yml
Created March 22, 2017 15:01 — forked from kovalevsky/.rubocop.yml
HttpLab common rubocop config
AllCops:
TargetRubyVersion: 2.3
Exclude:
- 'db/schema.rb'
- 'vendor/**/*'
- 'tmp/**/*'
- 'bin/*'
- 'docs/**/*'
Metrics/LineLength: